page-break-inside Attribute | pageBreakInside Property
New for Windows Internet Explorer 8
Note: This documentation is preliminary and is subject to change.

Sets or retrieves a string indicating whether a page break is allowed to occur inside the object.

Syntax

HTML { page-break-inside : sBreak }
Scripting[ sBreak = ] object.style.pageBreakInside [ = sBreak ]

Possible Values

sBreakString that specifies or receives one of the following values.
avoid Avoids a page break inside the element.
autoDefault. Neither forces nor forbids a page break inside element.

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.

Remarks

This property applies when the document is printed.

Normally, Internet Explorer attempts to avoid page breaks inside tables, blocks with borders, and positioned or floated elements. The page-break-inside attribute extends this behavior to other elements. A value of avoid instructs the browser to start the element on the following page if there is not enough room for it on the current page.

Page-break behavior is inherited from parent elements. A potential page-break location is also influenced by the page-break-after attribute of the preceding element, and/or the page-break-before attribute of the following element.

This property requires Internet Explorer to be in IE8 mode rendering.

Example

The following style rule causes Internet Explorer to avoid breaking paragraphs across pages.

<meta http-equiv="X-UA-Compatible" content="IE=8" />

<style type="text/css">
@media print {
    p {
        page-break-inside: avoid;
    }
}
</style>

Standards Information

This property is defined in Cascading Style Sheets (CSS), Level 2 Revision 1 (CSS2.1) World Wide Web link.

Applies To

currentStyle, runtimeStyle, style, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, DD, DIR, DIV, DL, DT, FIELDSET, FORM, hn, ISINDEX, LI, LISTING, MARQUEE, MENU, OL, P, PRE, TABLE, TBODY, TFOOT, TH, THEAD, TR, UL, XMP, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor


MSDN Library
Web Development
HTML and CSS
HTML and DHTML Reference
Properties
pageBreakInside
Tags: 
 
Community Content