B.125. widows

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 that must remain in a block following a page break.

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

Inherited: Yes

See also: Section B.72orphans

B.125.1. Value

A positive integer.

Initial value: 2

B.125.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.125.3. Example

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

p {
  widows: 4;
}

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

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