table-layer-transparency-009

Cell element background overlays backgrounds of all other table layers

WeasyPrint

This browser

Assertion
A background set on a cell element will overlay the backgrounds of all table elements below it.

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: Cell element background overlays backgrounds of all other table layers</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="flags" content="">
 8         <meta name="assert" content="A background set on a cell element will overlay the backgrounds of all table elements below it.">
 9         <style type="text/css">
10             table
11             {
12                 background: red;
13                 border-collapse: collapse;
14             }
15             colgroup, col, tbody, tr, td
16             {
17                 background: red;
18             }
19             td
20             {
21                 background: green;
22                 height: 2em;
23                 width: 2em;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if there is no red visible on the page.</p>
29         <table>
30             <colgroup>
31                 <col>
32                 <col>
33                 <col>
34             </colgroup>
35             <tbody>
36                 <tr>
37                     <td></td>
38                     <td></td>
39                     <td></td>
40                 </tr>
41                 <tr>
42                     <td></td>
43                     <td></td>
44                     <td></td>
45                 </tr>
46                 <tr>
47                     <td></td>
48                     <td></td>
49                     <td></td>
50                 </tr>
51             </tbody>
52         </table>
53     </body>
54 </html>