column-visibility-001.xht (1719B)
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: Column visibility property</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#columns" /> 7 <meta name="assert" content="Visibility can be set on a table column." /> 8 <style type="text/css"> 9 #table 10 { 11 display: table; 12 background: black; 13 } 14 .col, #col1 15 { 16 display: table-column; 17 } 18 #col1 19 { 20 visibility: collapse; 21 } 22 .tr 23 { 24 display: table-row; 25 } 26 .td1, .td2 27 { 28 display: table-cell; 29 } 30 .td2 31 { 32 background: red; 33 } 34 </style> 35 </head> 36 <body> 37 <p>Test passes if there is no red visible on the page.</p> 38 <div id="table"> 39 <div class="col"></div> 40 <div id="col1"></div> 41 <div class="col"></div> 42 <div class="tr"> 43 <div class="td1">Filler Text</div> 44 <div class="td2">This test failed.</div> 45 <div class="td1">Filler Text</div> 46 </div> 47 <div class="tr"> 48 <div class="td1">Filler Text</div> 49 <div class="td2">This test failed.</div> 50 <div class="td1">Filler Text</div> 51 </div> 52 </div> 53 </body> 54 </html>