border-conflict-element-001

Border Conflict Resolution (element) - cell vs. cell - element with highest priority is the dominant border

WeasyPrint

This browser

Assertion
With adjacent cells of same border-style and width, border collapsing favors the cell furthest to the top and left (in a 'left-to-right' table).

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 Conflict Resolution (element) - cell vs. cell - element with highest priority is the dominant border</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#border-conflict-resolution">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="With adjacent cells of same border-style and width, border collapsing favors the cell furthest to the top and left (in a 'left-to-right' table).">
 9         <style type="text/css">
10             table
11             {
12                 border-collapse: collapse;
13                 height: 2in;
14                 width: 2in;
15             }
16             td
17             {
18                 border: 5px solid black;
19             }
20             .collapsing1
21             {
22                 border-left: red;
23             }
24             #collapsing2
25             {
26                 border-top: red;
27             }
28         </style>
29     </head>
30     <body>
31         <p>Test passes if there is no red visible on the page.</p>
32         <table>
33             <tr>
34                 <td></td>
35                 <td></td>
36                 <td></td>
37             </tr>
38             <tr>
39                 <td></td>
40                 <td class="collapsing1"></td>
41                 <td class="collapsing1"></td>
42             </tr>
43             <tr>
44                 <td></td>
45                 <td id="collapsing2"></td>
46                 <td></td>
47             </tr>
48         </table>
49     </body>
50 </html>