AH Formatter /
XSL Formatter
XSLT/XSL-FO/SVG/MathML ConformanceXSL-FO |
|
| Q. | I specified "widows" and "orphans" property, but it is not effective. [No.2003050901] |
|---|---|
| A. |
See the specification of referred the CSS2 Specification from the W3C Recommendation. More detail is here. In the normal flow, page breaks can occur at the following places: 1. In the vertical margin between block boxes. When a page break occurs here, the computed values of the relevant 'margin-top' and 'margin-bottom' properties are set to '0'. 2. Between line boxes inside a block box. These breaks are subject to the following rules: Rule A: Breaking at (1) is allowed only if the 'page-break-after' and 'pagebreak- before' properties of all the elements generating boxes that meet at this margin allow it, which is when at least one of them has the value 'always', 'left', or 'right', or when all of them are 'auto'. Rule B: However, if all of them are 'auto' and the nearest common ancestor of all the elements has a 'page-break-inside' value of 'avoid', then breaking here is not allowed. Rule C: Breaking at (2) is allowed only if the number of line boxes between the break and the start of the enclosing block box is the value of 'orphans' or more, and the number of line boxes between the break and the end of the box is the value of 'widows' or more. Rule D: In addition, breaking at (2) is allowed only if the 'page-break-inside' property is 'auto'. Rule C is a condition that orphans and widows are applied. This is "2. Between line boxes inside a block box. ", orphans and widows is applied to line in one block. Therefore, when two or more block is included in block area where the orphans and widows property was specified, it is likely to change page in the boundary of inside block. |