The CSS reference
"page-break-before" - css property (v. css 2)
- Indicates the page-breaking behavior before an element
- Initial value: auto
- The property is not inherited
- HTML usage: block-level elements
-
Browsers that support the page-break-before - property :
Browser deviation:- Firefox, Chrome, and Safari do not support the property values "avoid", "left" and "right".
Possible page-break-before values:
value | Comments | CSS |
---|---|---|
auto | Neither force nor forbid a page break before the generated box. . | 2 |
always | Always force a page break before the generated box. | 2 |
avoid | Avoid a page break before the generated box. | 2 |
left | Force one or two page breaks before the generated box so that the next page is formatted as a left page. | 2 |
right | Force one or two page breaks before the generated box so that the next page is formatted as a right page. | 2 |
inherit | Will inherit the value from parent specification. | 2 |
Javascript access:
// To SET values ([o] is the target object)
[o].style.pageBreakBefore="page-break-before value"
// To GET values you must first get the computed style object
// To get that object in IE or Opera:
var cStyle=[o].currentStyle;
// To get that object in Firefox, Chrome or Safari (w3c-type):
var cStyle=window.getComputedStyle([o],null)
// To GET the property value:;
var value=cStyle.pageBreakBefore;
© 2010 by Finnesand Data.
All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the
correctness in the pages or source codes.
The risk of using this web-site pages or any program
codes from this website is entirely at the individual user.