CSS page-break-before property
Examples
Before setting the table element is always paging paging behavior:
<html>
<head>
<style>
@media print
{
h1 {page-break-before:always}
}
</style>
</head>
<body>
....
</body>
</html>
<head>
<style>
@media print
{
h1 {page-break-before:always}
}
</style>
</head>
<body>
....
</body>
</html>
Attribute definitions and instructions
page-break-before property settings page-breaking behavior element ago.
Note: You can use this property for absolutely positioned elements.
Note: Please use paging properties as little as possible, and avoid the use of paging properties in tables, floating elements, block elements with borders of.
Defaults: | auto |
---|---|
inherit: | no |
version: | CSS2 |
JavaScript syntax: | object .style.pageBreakBefore = "always" |
Browser Support
All major browsers support page-break-before property.
Note: any version of Internet Explorer (including IE8) support the property value "left", "right", and "inherit".
Note: Firefox, Chrome and Safari does not support the property value "avoid", "left" and "right".
Property Value
value | description |
---|---|
auto | Defaults. If necessary, insert a page break before the element. |
always | Insert a page break before an element. |
avoid | Avoid insert a page break before an element. |
left | Before element sufficient breaks, it has been left to a blank page so far. |
right | Before element sufficient breaks, right up to a blank page so far. |
inherit | Provisions should inherit the settings page-break-before property from the parent element. |