Export (0) Print
Expand All
Expand Minimize

2.1.52 [CSS-Level2-2009] Section 10.8, Line height calculations: the 'line-height' and 'vertical-align' properties

V0090:

The specification states:

As described in the section on inline formatting contexts, user agents flow 
inline-level boxes into a vertical stack of line boxes. The height of a line box 
is determined as follows:
 1.The height of each inline-level box in the line box is calculated (see 
"Calculating heights and margins" and the 'line-height' property).
 2.The inline-level boxes are aligned vertically according to their 'vertical-
align' property. In case they are aligned 'top' or 'bottom', they must be aligned 
so as to minimize the line box height. If such boxes are tall enough, there are 
multiple solutions and CSS 2.1 does not define the position of the line box's 
baseline (i.e., the position of the strut, see below).
 3.The line box height is the distance between the uppermost box top and the 
lowermost box bottom. (This includes the strut, as explained under 'line-height' 
below.)

IE8 Mode and IE9 Mode (All Versions)

In almost standards mode, step 4 is not followed. The line box height remains the distance between the uppermost box top and the lowermost box bottom.

All Document Modes (All Versions)

The É (É) character does not align properly when vertical-align is set to anything other than baseline.

V0091:

The specification states:

Empty inline elements generate empty inline boxes, but these boxes still have 
margins, padding, borders and a line height, and thus influence these calculations 
just like elements with content.

Quirks Mode and IE7 Mode (All Versions)

Empty inline elements have no effect on the page layout regardless of their computed margins, paddings, borders, and line heights.

IE8 Mode and IE9 Mode (All Versions)

In almost standards mode, empty elements do not influence line height calculations.

Show:
© 2014 Microsoft