Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

2.2.38 [CSS-Level2-2009] Section 10.8.1, Leading and half-leading

V0238:

The specification states:

Although margins, borders, and padding of non-replaced elements do not enter into 
the line box calculation, they are still rendered around inline boxes. This means 
that if the height specified by 'line-height' is less than the content height of 
contained boxes, backgrounds and colors of padding and borders may "bleed" into 
adjoining line boxes. User agents should render the boxes in document order. This 
will cause the borders on subsequent lines to paint over the borders and text of 
previous lines.

Quirks Mode and IE7 Mode (All Versions)

The following clarifications apply:

  • Backgrounds, padding colors, and borders are clipped to the bottom of the content box.

  • Backgrounds, padding colors, and borders are also clipped to the top of the content box if the value of the box is anything other than auto.

V0239:

The specification states:

<length>
 
The specified length is used in the calculation of the line box height. Negative 
values are illegal.

Quirks Mode and IE7 Mode (All Versions)

The following clarifications apply:

  • When the value of the line-height property is less than the content height the portion of the font that would pass below the bottom edge of the content box is clipped and does not appear outside of the box.

  • When the width of the element is computed to a value other than auto the content is clipped at the top edge of the content box.

V0240:

The specification states:

<number>
 
The used value of the property is this number multiplied by the element's font 
size. Negative values are illegal. The computed value is the same as the specified 
value.

Quirks Mode and IE7 Mode (All Versions)

The following clarifications apply:

  • When the value of the line-height property is less than the content height, the portion of the font that would pass below the bottom edge of the content box is clipped and does not appear outside of the box.

  • When the width of the element is computed to a value other than auto, the content is clipped at the top edge of the content box.

V0241:

The specification states:

<percentage>

The computed value of the property is this percentage multiplied by the element's 
computed font size. Negative values are illegal.

Quirks Mode and IE7 Mode (All Versions)

The following clarifications apply:

  • When the value of the line-height property is less than the content height the portion of the font that would pass below the bottom edge of the content box is clipped and does not appear outside of the box.

  • When the width of the element is computed to a value other than auto the content is clipped at the top edge of the content box.

V0242:

The specification states:

‘vertical-align’

Value:                 baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit
Initial:               baseline
Applies to:            inline-level and 'table-cell' elements
Inherited:             no
Percentages:           refer to the ‘line-height’ of the element itself
Media:                 visual
Computed value:        for <percentage> and <length> the absolute length, otherwise as specified

This property affects the vertical positioning inside a line box of the boxes 
generated by an inline-level element.

Quirks Mode and IE7 Mode (All Versions)

The vertical-align property of the table-cell elements is not supported.

V0243:

The specification states:

The following values align the element relative to the line box. Since the element 
may have children aligned relative to it (which in turn may have descendants 
aligned relative to them), these values use the bounds of the aligned subtree. The 
aligned subtree of an inline element contains that element and the aligned subtrees 
of all children inline elements whose computed 'vertical-align' value is not 'top' 
or 'bottom'. The top of the aligned subtree is the highest of the tops of the boxes 
in the subtree, and the bottom is analogous.

top
Align the top of the aligned subtree with the top of the line box.

bottom
Align the bottom of the aligned subtree with the bottom of the line box.

Quirks Mode and IE7 Mode (All Versions)

The vertical-align property of the table-cell elements is not supported.

V0244:

The specification states:

The baseline of an 'inline-block' is the baseline of its last line box in the 
normal flow, unless it has either no in-flow line boxes or if its 'overflow' 
property has a computed value other than 'visible', in which case the baseline is 
the bottom margin edge.

Quirks Mode and IE7 Mode (All Versions)

When the overflow property has a computed value other than visible the hidden element is not used to calculate the baseline.

Show:
© 2015 Microsoft