table-visual-layout-002

Internal table elements do not have margins

WeasyPrint

This browser

Assertion
Internal table elements do not have margins.

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: Internal table elements do not have margins</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-layout">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Internal table elements do not have margins.">
 9         <style type="text/css">
10             table
11             {
12                 border-spacing: 0;
13             }
14             colgroup, col, tbody, tr
15             {
16                 margin: 50px;
17             }
18             td
19             {
20                 background: black;
21                 height: 25px;
22                 margin: 50px;
23                 padding: 0;
24                 width: 25px;
25             }
26             #div1
27             {
28                 background: blue;
29                 height: 25px;
30                 width: 25px;
31             }
32         </style>
33     </head>
34     <body>
35         <p>Test passes if the boxes below are the same width.</p>
36         <table>
37             <colgroup>
38                 <col>
39             </colgroup>
40             <tbody>
41                 <tr>
42                     <td></td>
43                 </tr>
44             </tbody>
45         </table>
46         <div id="div1"></div>
47     </body>
48 </html>