units-001

Units: Equivalence

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: Equivalence</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/001.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    table { font: 16px/1 Ahem; }
12    td { padding: 0; background: red; }
13    div { background: green; height: 1.5625em; }
14    .px { width: 200px; }
15    .em { width: 12.5em; }
16    .ex { width: 15.625ex; }
17    .in { width: 2.08333in; }
18    .cm { width: 5.29166cm; }
19    .mm { width: 52.9166mm; }
20    .pt { width: 150pt; }
21    .pc { width: 12.5pc; }
22   </style>
23  </head>
24  <body>
25   <p>There should be a perfect green square below and no red.</p>
26   <table>
27    <tr>
28     <td>
29      <div class="px"></div>
30      <div class="em"></div>
31      <div class="ex"></div>
32      <div class="in"></div>
33      <div class="cm"></div>
34      <div class="mm"></div>
35      <div class="pt"></div>
36      <div class="pc"></div>
37     </td>
38    </tr>
39   </table>
40  </body>
41 </html>