table-layout-applies-to-003

Table-layout and 'display: list-item' elements

WeasyPrint

This browser

Flags
ahem
Assertion
Table-layout does not apply to 'display: list-item' 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: list-item' 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: list-item' elements.">
10         <style type="text/css">
11             body
12             {
13                 margin-left: 1em;
14             }
15             #test
16             {
17                 display: list-item;
18                 table-layout: fixed;
19                 width: 10em;
20             }
21             .colgroup
22             {
23                 display: table-column-group;
24                 width: 5em;
25             }
26             .tr
27             {
28                 display: table-row;
29             }
30             .td
31             {
32                 background: black;
33                 display: table-cell;
34                 font: 1em Ahem;
35                 overflow: hidden;
36                 padding: 0;
37             }
38             #reference
39             {
40                 background: blue;
41                 height: 2em;
42                 width: 20em;
43             }
44         </style>
45     </head>
46     <body>
47         <p>Test passes if both bars below are the same width and there is a marker bullet on the left-hand side of the black box.</p>
48         <div id="test">
49             <div class="colgroup"></div>
50             <div class="colgroup"></div>
51             <div class="tr">
52                 <div class="td">XXXXX</div>
53                 <div class="td">XXXXX</div>
54             </div>
55             <div class="tr">
56                 <div class="td">XXXXXXXXX0</div>
57                 <div class="td">XXXXXXXXX0</div>
58             </div>
59         </div>
60         <div id="reference"></div>
61     </body>
62 </html>