vertical-align-applies-to-007

Vertical-align applied to elements with 'display' set to 'table-cell'

WeasyPrint

This browser

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

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 'table-cell'</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 'table-cell'.">
10         <style type="text/css">
11             div
12             {
13                 color: blue;
14                 font: 20px/1em Ahem;
15             }
16             #table
17             {
18                 display: table;
19                 table-layout: fixed;
20             }
21             #row
22             {
23                 display: table-row;
24             }
25             #cell
26             {
27                 background: orange;
28                 display: table-cell;
29                 height: 1in;
30                 vertical-align: bottom;
31                 width: 1in;
32             }
33             .box
34             {
35                 background: black;
36                 height: 1em;
37                 width: 1in;
38             }
39         </style>
40     </head>
41     <body>
42         <p>Test passes if the blue box below is in the lower-left corner of the orange box.</p>
43         <div id="table">
44             <div id="row">
45                 <div id="cell">X</div>
46             </div>
47         </div>
48     </body>
49 </html>