table-layout-applies-to-014

Table-layout and 'display: table-cell' elements

WeasyPrint

This browser

Flags
ahem
Assertion
Table-layout does not apply to 'display: table-cell' elements.

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: Table-layout and 'display: table-cell' elements</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#propdef-table-layout">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#width-layout">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="Table-layout does not apply to 'display: table-cell' elements.">
10         <style type="text/css">
11             #table
12             {
13                 display: table;
14                 width: 10em;
15             }
16             #colgroup
17             {
18                 display: table-column-group;
19                 width: 10em;
20             }
21             #tr
22             {
23                 display: table-row;
24             }
25             #test
26             {
27                 background: black;
28                 display: table-cell;
29                 font: 1em Ahem;
30                 overflow: hidden;
31                 padding: 0;
32                 table-layout: fixed;
33             }
34             #reference
35             {
36                 background: blue;
37                 height: 1em;
38                 width: 20em;
39             }
40         </style>
41     </head>
42     <body>
43         <p>Test passes if both bars below are the same width.</p>
44         <div id="table">
45             <div id="colgroup"></div>
46             <div id="tr">
47                 <div id="test">XXXXXXXXX0XXXXXXXXX0</div>
48             </div>
49         </div>
50         <div id="reference"></div>
51     </body>
52 </html>