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: Vertical-align and alignment of inline boxes</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#inline-formatting">
7 <meta name="flags" content="ahem">
8 <meta name="assert" content="The 'vertical-align' property determines the vertical alignment of a box within a line box.">
9 <style type="text/css">
10 div
11 {
12 border-top: solid orange;
13 }
14 span
15 {
16 border: 20px solid blue;
17 display: inline-block;
18 font: 50px Ahem;
19 }
20 #span1
21 {
22 color: blue;
23 line-height: 1em;
24 }
25 #span2
26 {
27 line-height: 10px;
28 vertical-align: top;
29 }
30 </style>
31 </head>
32 <body>
33 <p>Test passes if all the blue and black boxes touch the orange line.</p>
34 <div>
35 <span id="span1">X</span>
36 <span id="span2">X</span>
37 </div>
38 </body>
39 </html>