numbers-units-010

Em size with font-size set to inch

WeasyPrint

This browser

Flags
ahem
Assertion
The 'em' unit is equal to the computed value of the 'font-size' property (inches) of the element on which it is used.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Em size with font-size set to inch</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="The 'em' unit is equal to the computed value of the 'font-size' property (inches) of the element on which it is used.">
 9         <style type="text/css">
10             #div1
11             {
12                 font-size: 1in;
13             }
14             #test
15             {
16                 background: black;
17                 height: 1em;
18                 width: 1em;
19             }
20             div
21             {
22                 font-family: Ahem;
23                 margin-top: 10px;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if the two boxes below are the same size.</p>
29         <div id="div1">
30             <div id="test"></div>
31             <div>X</div>
32         </div>
33     </body>
34 </html>