When printing a Web page, the browser simply places page breaks where they need to occur in the content so that all printed pages are as full as possible by default. This property affords you greater control over the placement of page breaks during printing, by letting you manually prevent page breaks from occurring in the middle of selected elements.
Inherited: Yes
See also: Section B.72orphans, Section B.82page-break-after, Section B.83page-break-before, Section B.125widows
This property can take any of the following values:
avoid
The browser will try to avoid placing a page break within the selected element(s).
The practical effect of this setting is to keep all of an element on one page.
auto
The browser will put a page break within the selected element(s) if the bottom of a page is reached while rendering it.
Initial value: auto
CSS Version: 2
Not supported by any currently-available browser.
This style rule keeps pre elements of class programlisting on one page whenever possible:
pre.programlisting { page-break-inside: avoid; }
3.144.230.82