Style pageBreakBefore Property

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








googletag.cmd.push(function() googletag.display('div-gpt-ad-1422003450156-2'); );




Style pageBreakBefore Property


❮ Style Object



Example


Always set a page break before each <p> element with id="footer":



document.getElementById("footer").style.pageBreakBefore = "always";

Try it Yourself »


Definition and Usage



The pageBreakBefore property sets or returns the page-break behavior before an element
(for printing or print preview).


Note: The pageBreakBefore property has no effect on absolutely positioned elements.
The page break is only visible in a print preview or when printing.



Browser Support














Property
pageBreakBefore Yes Yes Yes Yes Yes

Syntax


Return the pageBreakBefore property:



object.style.pageBreakBefore

Set the pageBreakBefore property:



object.style.pageBreakBefore = "auto|always|avoid|emptystring|left|right|initial|inherit"

Property Values




















Value Description
auto Insert a page break before the element if necessary. This is default
always Always insert a page break before the element
avoid Avoid a page break before the element
"" (empty string) Page break is not inserted before the element
left Insert one or two page breaks before the element, so the next page is considered a left page
right Insert one or two page breaks before the element, so the next page is considered a right page
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details








Default Value: auto 
Return Value: A String, representing the page-break behavior before an element when printing
CSS Version CSS2

Related Pages


CSS reference: page-break-before property




❮ Style Object

Popular posts from this blog

.name

Malaysia to Papua New Guinea by motorcycle?

List of Bhojpuri films