Back to my Opera Bugs page

Collapsed Table Borders

I have recently been working on tables with collapsed borders. I found the CSS2 Specification on Table Borders, but it doesn't specify how browsers should resolve ties of borders identical except for colour on elements of the same type. The proposed 2.1 working draft avoids the issue by stating that the result is undefined.

I've found that Opera renders the borders one way, while Mozilla/Firebird and Internet Explorer render them a different way.

Since 2.1 explicity doesn't define this issue, all the browsers are rendering correctly. However, perhaps Opera should consider switching to the Moz+IE method for consistency among the leading browsers?


<table summary="Test" style="border-collapse: collapse">
<tr>
<td style="border: 1px solid red">Foo</td>
<td style="border: 1px solid green">Foo</td>
<td style="border: 1px solid blue">Foo</td>
</tr>
<tr>
<td style="border: 1px solid green">Foo</td>
<td style="border: 1px solid blue">Foo</td>
<td style="border: 1px solid red">Foo</td>
</tr>
<tr>
<td style="border: 1px solid blue">Foo</td>
<td style="border: 1px solid red">Foo</td>
<td style="border: 1px solid green">Foo</td>
</tr>
</table>
Foo Foo Foo
Foo Foo Foo
Foo Foo Foo

Opera renders the table borders such the the border to the right or bottom has precendence (Opera probably renders left-right top-bottom and the later borders are drawn over the top of earlier borders).

In Opera:

Moz/IE seem to prevent later borders overriding already drawn borders.

In Firebird:

In Internet Explorer:

Back to my Opera Bugs page