XML technologies / ePUB / CSS essentials / Important CSS properties / Page breaks

(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)

The table lists the main CSS properties for page breaks, with possible values and an example each.

widows

Isolated lines at the top of a page

Sets how many lines may remain after a break, preventing typographically undesirable widows, isolated lines at the top of a page.

Values

<integer> | inherit

Example

widows: 2;

orphans

Isolated lines at the bottom of a page

Sets how many lines may remain before a break, preventing typographically undesirable “orphans”, isolated lines at the bottom of a page.

Values

<integer> | inherit

Example

orphans: 3;

page-break-inside

Page break inside an element

Prevents a page break within an element. Possible values:

1) avoid: never insert a page break

2) auto: unspecified (default)

Values

avoid | auto | inherit

Example

page-break-inside: avoid;

page-break-after

Page break after an element

Prevents a page break after an element. Possible values:

OPS note: readers displaying only one page must interpret right and left as always.

1) always: always insert a page break

2) avoid: never insert a page break

3) left: break after left-hand pages, moving the next element to the next left-hand page

4) right: break after right-hand pages, moving the next element to the next right-hand page

5) inherit: inherit the page-break setting

6) auto: unspecified (default).

Values

auto | always | avoid | left | right | inherit

Example

page-break-after: always;

page-break-before

Page break before an element

Prevents a page break before an element. Possible values:

OPS note: readers displaying only one page must interpret right and left as always.

1) always: always insert a page break

2) avoid: never insert a page break

3) left: break after left-hand pages, moving the next element to the next left-hand page

4) right: break after right-hand pages, moving the next element to the next right-hand page

5) inherit: inherit the page-break setting

6) auto: unspecified (default).

Values

auto | always | avoid | left | right | inherit

Example

page-break-before: avoid;

   

 

 

 

back to top