B.72. orphans

This property affects the position of page breaks, when the user prints the page from his or her browser. With this property, you can specify the minimum number of lines in a block before a page break can occur.

For example, if a paragraph element had six lines and the page size called for a page break to occur after the second line, then an orphans setting of 3 would force the page break to occur before the paragraph so that the first 3 lines could appear on the same page.

Inherited: Yes

See also: Section B.125widows

B.72.1. Value

A positive integer.

Initial value: 2

B.72.2. Compatibility

CSS Version: 2

This property is supported by Mozilla browsers (including Netscape 6 or later), Opera 7, and Internet Explorer 5 for Macintosh.

B.72.3. Example

This style rule indicates that page breaks must allow at least four lines of a broken paragraph to appear at the bottom of the page before the break occurs:

p {
  orphans: 4;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.97.189