O'Reilly logo

CSS Pocket Reference, 3rd Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Paged Media

orphans
Values:

<integer> | inherit

Initial value:

2

Applies to:

Block-level elements.

Inherited:

Yes.

Computed value:

As specified.

Description:

This specifies the minimum number of text lines within the element that can be left at the bottom of a page. This can affect the placement of page breaks within the element.

Examples:
p {orhpans: 4;}
ul {orphans: 2;}
Supported by:

Unknown.

page-break-after
Values:

auto | always | avoid | left | right | inherit

Initial value:

auto

Applies to:

Nonfloated block-level elements with a position value of relative or static.

Inherited:

No.

Computed value:

As specified.

Description:

This declares whether page breaks should be placed after an element. Although it is theoretically possible to force breaks with always, it is not possible to guarantee prevention; avoid asks the user agent to avoid inserting a page break if possible.

Examples:
div.section {page-break-after: always;}
h2 {page-break-after: avoid;}
Supported by:

Firefox, Internet Explorer, Opera, Safari.

Note:

The behavior of this property is highly unpredictable and may be buggy in some or all browsers listed.

page-break-before
Values:

auto | always | avoid | left | right | inherit

Initial value:

auto

Applies to:

Nonfloated block-level elements with a position value of relative or static.

Inherited:

No.

Computed value:

As specified.

Description:

Declares whether page breaks should be placed before an element. Although it is theoretically possible to force breaks with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required