1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5
6 <title>CSS Test: font-size - ex unit</title>
7
8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
9 <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-size-props">
10 <meta name="flags" content="ahem">
11 <meta name="assert" content="'em' and 'ex' length values when defining 'font-size' property refer to the computed font size of the parent element.">
12
13 <style type="text/css">
14 div {font-family: Ahem; font-size: 32px;}
15
16 p {margin: 10px 30px;}
17
18 #test {font-size: 16px;}
19 #control, #test {font-size: 2.5ex;}
20
21 #control2 {font-family: Ahem; font-size: 64px;}
22 </style>
23
24 </head>
25
26 <body>
27
28 <p>The 3 black squares below should have the same width and the same height.</p>
29
30 <div>
31 <p id="control">X</p>
32 <p id="test">X</p>
33 </div>
34
35 <p id="control2">X</p>
36
37 </body>
38 </html>