line-height

Support Key: [CSS1|CSS2] [IE3|N4|O3.5]
Other Dimension Properties
width
min-width
max-width
height
min-height
max-height
= Index DOT Css by Brian Wilson =
  Main Index | Property Index | CSS Support History | Browser History  



   Quick Statistics   
Default Value:
normal
Applicable Elements:
All
Inherit From Parent:
Yes
Applicable Media:
Visual
HTML Equivalent:
NA
What is it?
This property specifies the height of an in-line element box. If the 'line-height' value is greater than the value of the 'font-size' for the element, this difference (called the "leading") is cut in half (called the "half-leading") and distributed evenly on the top and bottom of the in-line box. In this manner, the content of an in-line element box is centered within the line-box (assuming no 'vertical-align' property is also set to change this behavior.) Negative values for this property are not allowed. This property is also a component of the 'font' shorthand property.

A few other rules govern line-height calculation:

Allowed Values
inherit
[CSS2] [N6|O4]
Type: Explicit
Description:
Explicitly sets the value of this property to that of the parent.
normal
[CSS1|CSS2] [IE3|N4|O3.5]
Type: Explicit
Description:
Sets the line height to a 'reasonable' value relative to the element's font face. Browser dependent results. CSS2 recommends a computed value between 1.0 and 1.2.
[number]
[CSS1|CSS2] [IE4|N4|O3.5]
Type: Explicit
Description:
This number is a multiplier to determine the line height as a factor of the current element font-size. To determine the line height from the [number], multiply the current element font-size by the [number]. Child elements will inherit the multiplying factor. Negative values are not allowed.
[length]
[CSS1|CSS2] [IE3|N4|O3.5]
Type: Explicit
Description:
This sets the 'line-height' to an explicit length value. Negative values are not allowed.
[percentage]
[CSS1|CSS2] [IE3|N4|O3.5]
Type: Calculated
Description:
This number is also a multiplier (like [number]) used to determine the line height as a factor of the current element font-size. To determine the line height from the [percentage], multiply the current element computed 'font-size' by the [percentage]. Negative values are not allowed.
Example
Ext/Doc: div.test { line-height: 160%; font-size: 10pt }
In-Line:  <div STYLE="line-height: 160%; font-size: 10pt">text</div>
Browser Peculiarities

Boring Copyright Stuff....