table-layout-applies-to-015

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

WeasyPrint

This browser

Flags
ahem
Assertion
Table-layout does not apply to 'display: table-caption' 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-caption' 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-caption' elements.">
10         <style type="text/css">
11             #table
12             {
13                 width: 10em;
14             }
15             #test
16             {
17                 display: table-caption;
18                 table-layout: fixed;
19             }
20             .colgroup
21             {
22                 display: table-column-group;
23                 width: 5em;
24             }
25             .tr
26             {
27                 display: table-row;
28             }
29             .td
30             {
31                 background: black;
32                 display: table-cell;
33                 font: 1em Ahem;
34                 overflow: hidden;
35                 padding: 0;
36             }
37             #reference
38             {
39                 background: blue;
40                 height: 2em;
41                 width: 20em;
42             }
43         </style>
44     </head>
45     <body>
46         <p>Test passes if both bars below are the same width.</p>
47         <div id="table">
48             <div id="test"></div>
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>