Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>CSS Test: Font-size using 'ex' units with a nominal value, 6ex</title>
<meta name="flags" content="ahem" />
<meta name="assert" content="The 'font-size' property sets a nominal length value in 'ex' units." />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
div
{
font-family: Ahem;
font-size: 20px;
line-height: 1em;
position: relative;
}
#div2
{
background-color: red;
color: black;
font-size: 6ex;
width: 1in;
}
#div3
{
background-color: black;
height: 6ex;
left: 100px;
position: absolute;
top: 0;
width: 6ex;
}
</style>
</head>
<body>
<p>Test passes if the two boxes below are the same size and there is no red visible on the page.</p>
<div id="div1">
<div id="div2">X</div>
<div id="div3"></div>
</div>
</body>
</html>