units-009.xht (1287B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> 3 <head> 4 <title>CSS Test: Units: px and dependent font-size</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-30 --> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/units/009.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units" /> 9 <link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths" /> 10 11 <link rel="match" href="units-006-ref.xht" /> 12 13 <meta name="flags" content="ahem" /> 14 15 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 16 <style type="text/css"> 17 div { margin: 4px 0; } 18 .border { border-top: solid 20px blue; width: 600px; } 19 .font { font: 10px/1 Ahem; color: blue; } 20 .inner { font-size: 2em; } 21 </style> 22 </head> 23 <body> 24 25 <p>Test passes if the 2 blue bars have the <strong>same width</strong>.</p> 26 27 <div class="border"></div> 28 <div class="font"><div class="inner">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div></div> 29 30 </body> 31 </html>