table-column-rendering-004

Table column groups can induce a style on their cells

WeasyPrint

This browser

Assertion
Table column groups can induce a style (background-color) on the cells they occupy.

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 column groups can induce a style on their cells</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#table-display">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Table column groups can induce a style (background-color) on the cells they occupy.">
 9         <style type="text/css">
10             .table
11             {
12                 display: table;
13             }
14             .colgroup
15             {
16                 display: table-column-group;
17             }
18             #test
19             {
20                 background: blue;
21             }
22             .col
23             {
24                 display: table-column;
25             }
26             .tr
27             {
28                 display: table-row;
29             }
30             .td
31             {
32                 border: 1px solid black;
33                 display: table-cell;
34                 height: 2em;
35                 width: 2em;
36             }
37         </style>
38     </head>
39     <body>
40         <p>Test passes if the middle column of the three-by-three table below is blue.</p>
41         <div class="table">
42             <div class="colgroup">
43                 <div class="col"></div>
44             </div>
45             <div class="colgroup" id="test">
46                 <div class="col"></div>
47             </div>
48             <div class="colgroup">
49                 <div class="col"></div>
50             </div>
51             <div class="tr">
52                 <div class="td"></div>
53                 <div class="td"></div>
54                 <div class="td"></div>
55             </div>
56             <div class="tr">
57                 <div class="td"></div>
58                 <div class="td"></div>
59                 <div class="td"></div>
60             </div>
61             <div class="tr">
62                 <div class="td"></div>
63                 <div class="td"></div>
64                 <div class="td"></div>
65             </div>
66         </div>
67     </body>
68  </html>