Click to Rate and Give Feedback
MSDN
MSDN Library
widows Attribute | widows Property

Gets or sets the minimum number of lines of a paragraph that must appear at the top of a document.

Syntax

CSS { widows : nLines }
Scripting[ nLines = ] object.style.widows [ = nLines ]

Possible Values

nLinesVariant that specifies or receives the minimum number of lines to print at the top of a document.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has no default value. The Cascading Style Sheets (CSS) attribute is not inherited.

Remarks

This property applies when the document is printed. If there are fewer lines than necessary to satisfy this rule, the lines are moved to the following document . The widows property has precedence over the orphans property.

This property requires Windows Internet Explorer to be in IE8 Standards mode rendering.

Example

The following style rule ensures that at least three lines of a paragraph appear at the bottom and top of each printed document.

<meta http-equiv="X-UA-Compatible" content="IE=8" />

<style type="text/css">
@media print {
    p {
        widows:3;
        orphans:3;
    }
}
</style>

Standards Information

This property is defined in Cascading Style Sheets (CSS), Level 2 Revision 1 (CSS2.1).

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CSSStyleDeclaration, currentStyle, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PRE, runtimeStyle, S, SAMP, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor

See Also

orphans
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker