separated-border-model-001

Distance between the table border and a bordering cell

WeasyPrint

This browser

Assertion
The distance between table border and bordering cell equals table padding + cell's border spacing.

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: Distance between the table border and a bordering cell</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#separated-borders">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The distance between table border and bordering cell equals table padding + cell's border spacing.">
 9         <style type="text/css">
10             table
11             {
12                 border-left: 10px solid black;
13                 border-spacing: 50px 0;
14                 padding-left: 50px;
15             }
16             td
17             {
18                 background: black;
19                 height: 1em;
20                 padding: 0;
21                 width: 10px;
22             }
23             div
24             {
25                 background: blue;
26                 height: 1em;
27                 width: 120px;
28             }
29         </style>
30     </head>
31     <body>
32         <p>Test passes if the blue box spans from the start of the first black box to the end of the second black box.</p>
33         <table>
34             <tr>
35                 <td></td>
36             </tr>
37         </table>
38         <div></div>
39     </body>
40 </html>