border-spacing-applies-to-006

Border-spacing and 'display: table' elements

WeasyPrint

This browser

Assertion
Border-spacing applies to 'display: table' elements.

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: Border-spacing and 'display: table' elements</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#propdef-border-spacing">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#separated-borders">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="Border-spacing applies to 'display: table' elements.">
10         <style type="text/css">
11             #table
12             {
13                 border-spacing: 20px;
14                 display: table;
15             }
16             .tr
17             {
18                 display: table-row;
19             }
20             .td
21             {
22                 display: table-cell;
23                 height: 100px;
24                 width: 100px;
25             }
26             .top
27             {
28                 border: 10px solid blue;
29             }
30             .bottom
31             {
32                 border: 10px solid orange;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if there is a blue and orange square below and there is a vertical gap between the squares.</p>
38         <div id="table">
39             <div class="tr">
40                 <div class="td top"></div>
41             </div>
42             <div class="tr">
43                 <div class="td bottom"></div>
44             </div>
45         </div>
46     </body>
47 </html>