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 columns 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 columns can induce a style (background-color) on the cells they occupy.">
9 <style type="text/css">
10 .table
11 {
12 display: table;
13 }
14 .col
15 {
16 display: table-column;
17 }
18 #test
19 {
20 background: blue;
21 }
22 .tr
23 {
24 display: table-row;
25 }
26 .td
27 {
28 border: 1px solid black;
29 display: table-cell;
30 height: 2em;
31 width: 2em;
32 }
33 </style>
34 </head>
35 <body>
36 <p>Test passes if the middle column of the three-by-three table below is blue.</p>
37 <div class="table">
38 <div class="col"></div>
39 <div id="test" class="col"></div>
40 <div class="col"></div>
41 <div class="tr">
42 <div class="td"></div>
43 <div class="td"></div>
44 <div class="td"></div>
45 </div>
46 <div class="tr">
47 <div class="td"></div>
48 <div class="td"></div>
49 <div class="td"></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>
57 </body>
58 </html>