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