| Microsoft Typography | Typography on the Web | Specifying... | 5.4.8 'line-height' | |||
|
Value: normal | <number> | <length> |
<percentage>
Initial: normal Applies to: all elements Inherited: yes Percentage values: relative to the font size of the element itself Microsoft® Internet Explorer 3.0 support: somewhat unpredictable. Microsoft Internet Explorer 4.0 support: yes.
When a numerical value is specified, the line height is given by the font size of the current element multiplied with the numerical value. This differs from a percentage value in the way it inherits: when a numerical value is specified, child elements will inherit the factor itself, not the resultant value (as is the case with percentage and other units). Negative values are not allowed. The three rules in the example below have the same resultant line height: DIV { line-height: 1.2; font-size: 10pt }
/* number */
DIV { line-height: 1.2em; font-size: 10pt }
/* length */
DIV { line-height: 120%; font-size: 10pt }
/* percentage */
A value of 'normal' sets the 'line-height' to a reasonable value for the element's font. It is suggested that UAs set the 'normal' value to be a number in the range of 1.0 to 1.2. See the section 4.7 for a description on how 'line-height' influences the formatting of a block-level element.
Dark blue text is taken from Cascading Style Sheets, level 1. W3C Recommendation 17 December 1996 - http://www.w3.org/pub/WWW/TR/REC-CSS1
|
|||
| Microsoft Typography | Typography on the Web | Specifying... | 5.4.8 'line-height' | |||