CSS page-break-before Property

The page-break-before property defines page break before the element.

This property cannot be used on an empty <div> or on absolutely positioned elements.

The page-break-before property is replaced by break-before property.

Initial Value auto
Applies to Block-level elements.
Inherited No.
Animatable No.
Version CSS2
DOM Syntax object.style.pageBreakBefore = "Left";

Syntax

page-break-before: auto | always | avoid | left | right | initial | inherit;

Example

@media print {
h2 { 
page-break-before: right; 
}

Values

Value Description
auto Allows any automatic page break before the element.
avoid Avoids to insert any page break before the element.
always Forces to insert any page break before the element.
left Insert a page break before the element so that the next page is formatted as a left page.
right Insert a page break before the element so that the next page is formatted as a right page.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.


Practice Your Knowledge

page-break-before property doesn't have __ value.




Related articles