vertical-align-applies-to-008

Vertical-align applied to elements with 'display' set to 'inline'

WeasyPrint

This browser

Flags
ahem
Assertion
The 'vertical-align' property applies to elements with 'display' set to 'inline'.

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 applied to elements with 'display' set to 'inline'</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 applies to elements with 'display' set to 'inline'.">
10         <style type="text/css">
11             div
12             {
13                 background: orange;
14             }
15             div div
16             {
17                 display: inline;
18             }
19             #div1
20             {
21                 color: blue;
22                 font: 20px/1em Ahem;
23                 vertical-align: bottom;
24             }
25             #div2
26             {
27                 color: orange;
28                 font: 1in/1em Ahem;
29             }
30         </style>
31     </head>
32     <body>
33         <p>Test passes if the blue box below is in the lower-left corner of the orange box.</p>
34         <div>
35             <div id="div1">X</div>
36             <div id="div2">X</div>
37         </div>
38     </body>
39 </html>