Easy Tutorial
❮ Sel Firstchild Pr Padding Top ❯

CSS page-break-before Property

Example

Insert a page break before every <h1> element:

@media print {
    h1 {page-break-before: always;}
}

Property Definition and Usage

The page-break-before property adds a page break before the specified element.

Note: You cannot use this property on absolutely positioned elements.

Note: Use page break properties sparingly and avoid using them within tables, floating elements, and block elements with borders.

Default value: auto
Inherited: no
--- ---
Version: CSS2
--- ---
JavaScript syntax: object.style.pageBreakBefore="always"
--- ---

Browser Support

All major browsers support the page-break-before property.

Note: Any version of Internet Explorer (including IE8) supports the property values "left", "right", and "inherit".

Note: Firefox, Chrome, and Safari do not support the property values "avoid", "left", and "right".


Property Values

Value Description
auto Default. Inserts a page break before the element if necessary.
always Inserts a page break before the element.
avoid Avoids a page break before the element.
left Inserts one or two page breaks before the element, enough to go to the next left page.
right Inserts one or two page breaks before the element, enough to go to the next right page.
inherit Specifies that the value of the page-break-before property should be inherited from the parent element.
❮ Sel Firstchild Pr Padding Top ❯