Getting StartED with CSS

Print Properties

These properties control page breaks when the media value is set to print. See Chapter 12 for a detailed description. At the time of this writing, IE8 and Opera are the only browsers that support these properties.

orphans

Accepted values:
An integer (whole number)
Default:
2
Inherited:
Yes

Specifies the minimum number of lines of a block-level element that should be printed at the bottom of a page. If fewer lines would be printed, the browser should force a page break, and move the whole element to the next page.

page-break-after

Accepted values:
auto, always, avoid, left, right
Default:
auto
Inherited:
No

Specifies whether to force or avoid a page break after a particular block-level element. The left and right values refer to the :left and :right pseudo-classes defined by an @page rule, as described in Chapter 12.

page-break-before

Accepted values:
auto, always, avoid, left, right
Default:
auto
Inherited:
No

Specifies whether to force or avoid a page break before a particular block-level element. The left and right values refer to the :left and :right pseudo-classes defined by an @page rule, as described in Chapter 12.

page-break-inside

Accepted values:
avoid, auto
Default:
auto
Inherited:
No

Specifies whether to permit a page break inside a particular block-level element.

widows

Accepted values:
An integer (whole number)
Default:
2
Inherited:
Yes

Specifies the minimum number of lines of a block-level element that should be printed at the top of a page. If fewer lines would be printed, the browser should move the whole element to the current page.