units-009

Units: px and dependent font-size

WeasyPrint

This browser

Flags
ahem

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html 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="alternate" href="http://www.hixie.ch/tests/adhoc/css/units/009.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units">
 8   <meta name="flags" content="ahem">
 9   <style type="text/css">
10    .control { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
11    div { margin: 4px 0; }
12    .border { border-top: solid 20px blue; width: 600px; }
13    .font { font: 10px/1 Ahem; color: blue; }
14    .inner { font-size: 2em; }
15   </style>
16  </head>
17  <body>
18   <div class="control">Ahem_font_required_for_this_test.</div>
19 
20   <p>The two bars below should be exactly the same length.</p>
21 
22   <div class="border"></div>
23   <div class="font"><div class="inner">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div></div>
24 
25  </body>
26 </html>