vertical-align-120

Vertical-align with a keyword, 'inherit'

WeasyPrint

This browser

Flags
ahem
Assertion
The 'vertical-align' property sets the keyword 'inherit' and inherits the computed value from the parent element.

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, 'inherit'</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 'inherit' and inherits the computed value from the parent element.">
10         <style type="text/css">
11             div
12             {
13                 font: 0.5in/1em Ahem;
14                 position: relative;
15             }
16             #div2
17             {
18                 vertical-align: middle;
19             }
20             #div3
21             {
22                 position: absolute;
23                 top: 0.75in;
24             }
25             #span1
26             {
27                 color: red;
28                 vertical-align: inherit;
29             }
30             #span2
31             {
32                 font: 1.5in/1em Ahem;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if there is a small and large box on the page and there is no red visible on the page.</p>
38         <div id="div1">
39             <div id="div2">
40                 <span id="span1">X</span><span id="span2">X</span>
41             </div>
42             <div id="div3">X</div>
43         </div>
44     </body>
45 </html>