blob: 9c70da07b367091ef4f649ea3c47678db2f7a492 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: line-height - line box height calculations</title>
<link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height" title="10.8 Line height calculations: the 'line-height' and 'vertical-align' properties" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#inline-formatting" title="9.4.2 Inline formatting contexts" />
<meta content="ahem image" name="flags" />
<meta content="The line box height is given by the distance between the uppermost box top and the lowermost box bottom. The line box height is not necessarly given by the height of the tallest inline box contained in the line box." name="assert" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css"><![CDATA[
div
{
background-color: orange; /* The line box will be painted orange */
color: black;
}
span {font: 1.25em/1 Ahem;}
span#va-minus10 {vertical-align: -10px;}
span#va-baseline {vertical-align: baseline;}
span#va-plus10 {vertical-align: 10px;}
span#va-plus20 {vertical-align: 20px;}
]]></style>
</head>
<body>
<p>Test passes if the orange rectangle is just tall enough to contain the bottommost small filled black square and the uppermost small filled black square.</p>
<!--
In this test, the short vertical blue line represents the tallest
inline box present in the line box. And its presence contribute
to demonstrate that the line box height is not necessarly given
by the height of its tallest inline box.
-->
<div>
<span id="va-minus10">1</span>
<span id="va-baseline">0</span>
<img src="support/swatch-blue.png" width="5" height="35" alt="Image download support must be enabled" />
<span id="va-plus10">1</span>
<span id="va-plus20">2</span>
</div>
</body>
</html>