Home | Top | Web development | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves a string indicating whether a page break occurs before the object .
Syntax
{ page-break-before : sBreak } |
object . style.pageBreakBefore [ = sBreak ] |
Possible Values
sBreak | String that specifies or receives one of the following values.
|
The property is read/write for all objects except the following, for which it is read-only: currentStyle . The property has a default value of auto . The Cascading Style Sheets (CSS) attribute is not inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties .
Remarks
This property applies when printing the document. This property does not apply to the BR or HR elements.
If there are conflicts between the value of this property and the pageBreakAfter property of the object previously displayed in the browser, the value that results in the largest number of page breaks is used.
Page breaks are not permitted inside positioned objects.
Examples
The following examples use the page-break-before attribute and the pageBreakBefore property to start printing on a new page.This example uses the H3 element as a selector in an embedded style sheet to break the page before all H3 headings.
<STYLE> H3 { page-break-before : always } </STYLE> </HEAD>This example uses a call to a function to turn off the page break before the object that has an ID value of idParagraph . When the page is printed, a page break occurs before the first paragraph unless the user clicks the Turn Off Break button.
<SCRIPT> function offBreak() { Paragraph.style. pageBreakBefore =""; } </SCRIPT> </HEAD>Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) .
Applies To
|
ADDRESS , BLOCKQUOTE , BODY , CAPTION , CENTER , currentStyle , DD , DIV , DL , DT , FIELDSET , FORM , hn , ISINDEX , LI , LISTING , MENU , OL , P , PLAINTEXT , PRE , runtimeStyle , style , TABLE , TBODY , TD , TFOOT , TH , THEAD , TR , UL , XMP |
Home | Top | Web development | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |