The page-break-before
property adds a page-break after 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 after the <footer> element.
@media print { footer { page-break-after: always; } }
page-break-after: auto | always | avoid | left | right | initial | inherit;
Value | Description |
---|---|
auto |
Default. Automatic page-break |
always |
Insert a page-break after the element |
avoid |
Avoid a page-break after the element, if possible |
left |
Insert a page-break before the element so that the next page is formatted as a left page |
right |
Insert a page-break after 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-after
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 |