page-break-inside

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

Syntax

{ page-break-inside: sBreak }

Possible values

sBreak

String that specifies one of the following values:

auto

Default. Neither force nor forbid a page break before the object.

avoid

Forbid a page break inside the object, if possible.

empty string

Behaves the same as auto.

inherit

Inherit the value of the same property for the object's parent

The property has a default value of auto. It is not inherited.

Remarks

This property applies when the document is printed.

Normally, browsers attempt to avoid page breaks inside tables, blocks with borders, and positioned or floated elements. The page-break-inside property 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 objects. A potential page-break location is also influenced by the page-break-after property of the preceding object, and/or the page-break-before property of the following object. If there are conflicts between the value of this property and the page-break-after property of the object previously displayed in the browser, the value that results in the largest number of page breaks is used.

Examples

The following example uses the page-break-inside property to avoid breaking paragraphs across pages:

<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 (CSS2) Hh314584.xtlink_newWindow(en-us,Expression.40).png.

Applies to

blockquote, body, button, caption, center, dd, div, dl, dt, fieldset, form, hn, isindex, li, marquee, ol, p, pre, table, tbody, tfoot, th, thead, tr, ul, xmp

See also

Concepts

page-break-after

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.