vertical-align-118

Vertical-align with a keyword, 'text-top'

WeasyPrint

This browser

Flags
ahem
Assertion
The 'vertical-align' property sets the keyword 'text-top'.

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: Vertical-align with a keyword, 'text-top'</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'vertical-align' property sets the keyword 'text-top'.">
10         <style type="text/css">
11             #div1
12             {
13                 position: relative;
14             }
15             #div2
16             {
17                 position: absolute;
18                 top: 0;
19             }
20             #span1
21             {
22                 font: 1.5in/1em Ahem;
23             }
24             span span
25             {
26                 color: red;
27                 vertical-align: text-top;
28             }
29             #div2, span span
30             {
31                 font: 0.5in/1em Ahem;
32             }
33         </style>
34     </head>
35     <body>
36         <p>Test passes if there is a large and small box on the page and there is no red visible on the page.</p>
37         <div id="div1">
38             <div>
39                 <span id="span1"><span>X</span>X</span>
40             </div>
41             <div id="div2">X</div>
42         </div>
43     </body>
44 </html>