You’re viewing an archive of outdated material. Visit The Web Standards Project’s updated site to learn about our current mission.

Vertical Alignment

[Image]The first eight words (eight has a descender) in this sentence should be 12pt in size and bottom-aligned, which should align their bottom with the bottom of the lowest element in the line (including descenders). MacIE 4.5 aligns with baseline of the text.

[Image]The first four words in this sentence should have a font-size of 12px and a line-height of 16px; they are also 50%-aligned, which should raise them 8px relative to the natural baseline.

In the following paragraph, all images should be aligned with the top of the 14-point text, which is identical to the first section of text, whereas any size text should be aligned with the text baseline (which is the default value).

This paragraph [Image] contains many images [Image] of varying heights [Image] and widths [Image] all of which [Image] should be aligned [Image] with the top of [Image] a 14-point text element [Image] regardless of the line in which [Image] the images appear. [Image]

In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should be aligned with the text baseline (which is the default value).

This paragraph [Image] contains many images [Image] of varying heights [Image] and widths [Image] all of which [Image] should be aligned [Image] with the middle of [Image] a 14-point text element [Image] regardless of the line in which [Image] the images appear. [Image]

In the following paragraph, all images should be aligned with the bottom of the 14-point text, which is identical to the first and last sections of text. All remaining text in the sentence should also be aligned with the bottom of the 14pt text. Note that this should be the BOTTOM, including descenders, not the baseline of the text. MacIE 4.5 is aligning to the baseline.

This paragraph [Image] contains many images [Image] of varying heights [Image] and widths [Image] all of which [Image] should be aligned [Image] along with all the text [Image] with the bottom of [Image] a 14-point text element [Image] regardless of the line in which [Image] the images [Image] and text appear.