table-anonymous-block-005

The anonymous block box around a table and the table 'position' property

WeasyPrint

This browser

Assertion
The 'position' property of a table is actually applied to its anonymous block box.

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: The anonymous block box around a table and the table 'position' 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#model">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The 'position' property of a table is actually applied to its anonymous block box.">
 9         <style type="text/css">
10             div
11             {
12                 border-top: 5px solid black;
13                 width: 200px;
14             }
15             table
16             {
17                 border-spacing: 0;
18                 position: relative;
19                 top: 100px;
20             }
21             caption
22             {
23                 background: orange;
24                 color: orange;
25             }
26             td
27             {
28                 background: blue;
29                 color: blue;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if the blue box is directly beneath the orange box and neither box is touching the black line.</p>
35         <div>
36             <table>
37                 <caption>Filler Text Filler Text</caption>
38                 <tr>
39                     <td>Filler Text Filler Text</td>
40                 </tr>
41             </table>
42         </div>
43     </body>
44 </html>