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-x 0 6.25ex;
21 font-size: 2.5ex;
22 margin: 0px;
23 }
24
25 #vertical-ruler {margin-top: 1px;}
26
27 #expected-results
28 {
29 font-family: serif;
30 margin-left: 3em;
31 margin-top: -3em;
32 }
33 </style>
34
35 </head>
36
37 <body>
38
39 <p id="vertical-ruler"><img src="support/ruler-v-100px-200px-300px.png" width="55" height="350" alt="FAIL"></p>
40
41 <p id="expected-results">A thin green horizontal line should appear at exactly 200px</p>
42
43 </body>
44 </html>