The page-break-before
property adds a page-break before an element.
This property is used to control the printing of an HTML document.
It does not work with absolute positioned elements or empty <div> elements.
During printing a page break is added before the <header> element.
@media print { header { page-break-before: always; } }
page-break-before: auto | always | avoid | left | right | initial | inherit;
Value | Description |
---|---|
auto |
Default. Automatic page-break |
always |
Inserts a page-break after the element |
avoid |
Avoid a page-break after the element (if possible) |
left |
Insert page-break before the element so that the next page is formatted as a left page |
right |
Insert page-break before the element so that the next page is formatted as a right page |
initial |
Sets the value to its default value |
inherit |
Inherits the value from its parent element |
This table shows when page-break-before
support started for each browser.
Chrome
|
1.0 | Dec 2008 |
Firefox
|
1.0 | Nov 2004 |
IE/Edge
|
4.0 | Sep 1997 |
Opera
|
7 | Jan 2003 |
Safari
|
1.0 | Jun 2003 |