Note: This documentation is preliminary and is subject to change.
Sets or retrieves
the minimum number of lines of a paragraph that must appear
at the top of a page.
Syntax
HTML |
{ widows : nLines }
|
---|
Scripting | [ nLines = ] object.style.widows [ = nLines ] |
---|
Possible Values
nLines | Variant that
specifies or receives
the minimum number of lines to print at the top of a page.
|
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 page. The
widows
property has precedence over the
orphans property.
This property requires Internet Explorer to be in
IE8 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 page.
<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
|
currentStyle,
runtimeStyle,
style,
A,
ADDRESS,
B,
BIG,
BLOCKQUOTE,
BODY,
CAPTION,
CENTER,
CITE,
CODE,
COL,
COLGROUP,
DD,
DFN,
DIR,
DIV,
DL,
DT,
EM,
FIELDSET,
FORM,
hn,
HTML,
I,
KBD,
LABEL,
LEGEND,
LI,
LISTING,
MARQUEE,
MENU,
OL,
P,
PRE,
S,
SAMP,
SMALL,
SPAN,
STRIKE,
STRONG,
SUB,
SUP,
TABLE,
TBODY,
TD,
TEXTAREA,
TFOOT,
TH,
THEAD,
TR,
TT,
U,
UL,
VAR,
XMP |
See Also
orphans