22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Value: | inherit<br />

Initial: 2<br />

Applies to: block-<strong>level</strong> elements<br />

Inherited: yes<br />

Percentages: N/A<br />

Media: visual, paged<br />

’widows’<br />

Value: | inherit<br />

Initial: 2<br />

Applies to: block-<strong>level</strong> elements<br />

Inherited: yes<br />

Percentages: N/A<br />

Media: visual, paged<br />

The ’orphans’ property specifies the minimum number of lines of a paragraph<br />

that must be left at the bottom of a page. The ’widows’ property specifies the<br />

minimum number of lines of a paragraph that must be left at the top of a page.<br />

Examples of how they are used to control page breaks are given below.<br />

For information about paragraph formatting, please consult the section on line<br />

boxes [p. 105] .<br />

13.3.4 Allowed page breaks<br />

In the normal flow, page breaks can occur at the following places:<br />

1. In the vertical margin between block boxes. When a page break occurs here,<br />

the computed values [p. 70] of the relevant ’margin-top’ and ’margin-bottom’<br />

properties are set to ’0’.<br />

2. Between line boxes [p. 105] inside a block [p. 97] box.<br />

These breaks are subject to the following rules:<br />

Rule A: Breaking at (1) is allowed only if the ’page-break-after’ and<br />

’page-break-before’ properties of all the elements generating boxes that<br />

meet at this margin allow it, which is when at least one of them has the value<br />

’always’, ’left’, or ’right’, or when all of them are ’auto’.<br />

Rule B: However, if all of them are ’auto’ and the nearest common ancestor<br />

of all the elements has a ’page-break-inside’ value of ’avoid’, then breaking<br />

here is not allowed.<br />

Rule C: Breaking at (2) is allowed only if the number of line boxes [p. 105]<br />

between the break and the start of the enclosing block box is the value of<br />

’orphans’ or more, and the number of line boxes between the break and the<br />

end of the box is the value of ’widows’ or more.<br />

Rule D: In addition, breaking at (2) is allowed only if the ’page-break-inside’<br />

property is ’auto’.<br />

183

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!