line-height
- 4This page tests the inline formatting model (inline boxes, line
boxes, and so on) in the ways that it affects line-height
and font-size
.
font-size
, line-height
, vertical-align
, inline styles and classes.Warning. The "Ahem" font is not yet installed correctly! Please install it before continuing with this test!
The box below should start one pixel below the line marked '0' on the ruler. It should be exactly 100px high. Its width should be 100px too..
The following test should look similar, except that since we are using a different width, it could be of a different height, since the computed max-ascent to max-descent could be different, and its that that gets coloured. However, there shouldn't be any more or less ruler visible.
The image below should start one pixel below the line marked '0' on the ruler. It should be exactly 100px high.
The following test should look absolutely identical. Even though we are using a different font, it has the same font-size.
The boxes below should start one pixel below the line marked '0' on the ruler, and should be flush with the ruler. They should be exactly 100px high.
The following test should have the same height of of ruler. However, the background may be more or less. If the glyphs spill out of the background, then that is fine, because it is a different font.
All text below should have the same baseline. However, the coloured bars will almost certainly not line up or be the same height — each character will have their box up or down a little compared to the others because each font's baseline is probably not the same distance from the font's bottom and the font's top, and each font has different max-ascent to max-descent length. This means that overall, the line will be taller that 100px.
Bugzilla: Bug 4234
Last updated in May 1999.