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: background-position - 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/colors.html#background-properties">
10 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units">
11 <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-size-props">
12 <meta content="ahem image" name="flags">
13 <meta content="ex unit is the 'x-height' of the relevant font. 'em' and 'ex' length values when defining 'font-size' property refer to the computed font size of the parent element." name="assert">
14
15 <style type="text/css">
16 html {font: 20px/1 Ahem;}
17
18 body
19 {
20 background: url("support/1x1-lime.png") repeat-y 12.5ex 0;
21 font-size: 2.5ex;
22 margin: 0;
23 }
24
25 #expected-results {font-family: serif;}
26 </style>
27
28 </head>
29
30 <body>
31
32 <p><img src="support/ruler-h-200px-400px.png" width="700" height="18" alt="FAIL"></p>
33
34 <p id="expected-results">A thin green vertical line should appear at exactly 400px</p>
35
36 </body>
37 </html>