table-layer-transparency-example-001.xht (1547B)
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: Empty cells set to 'hide' are transparent down to the table background</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-layers" /> 7 <meta name="assert" content="If 'empty-cells' is set to 'hide', empty cells are transparent all the way down to the table background, (example from spec section 17.5.1)." /> 8 <style type="text/css"> 9 table 10 { 11 background: #ff0; 12 border: solid black; 13 empty-cells: hide; 14 } 15 tr.top 16 { 17 background: orange; 18 } 19 td 20 { 21 border: 2px solid black; 22 } 23 </style> 24 </head> 25 <body> 26 <p>Test passes if the table below has two rows of cells with black borders, cell '2' spans both rows, and cells '1', '2', '3', '4' have a orange background. There cannot be any visible cells below cells '3' or '4'.</p> 27 <table> 28 <tr class="top"> 29 <td> 1</td> 30 <td rowspan="2"> 2</td> 31 <td> 3</td> 32 <td> 4</td> 33 </tr> 34 <tr> 35 <td> 5</td> 36 <td></td> 37 </tr> 38 </table> 39 </body> 40 </html>