On Apr 1, 2011, at 4:42 AM, Brian King wrote:

> I don't know why this works.  And I don't know why it doesn't.
> 
> I've always heard it as canon that you can't border a table row like: tr
> {border:1px solid black}, and I've accepted it.  BUT.
> 
> Why does this work in Firefox [3.6.13]:  (I just sort of stumbled over it,
> and I take no credit for discovering it or not discovering it.)
> 
> <style type="text/css">
> table { border-collapse: collapse; }
> tr {border:1px solid black;}
> </style>
> <table>
> <thead>
> <tr >
>        <td>Data Element</td>
>        <td>Data Element</td>
>        <td>Data Element</td>
> </tr>
> </thead>
> </table>
> 
> If I remove the table border-collapse, then I don't get a border.  I will
> note, that NEITHER option works in IE [7.0.6001.18000].

<http://www.w3.org/TR/CSS21/tables.html#borders>
describes the differences, albeit in a not so clear way.
Much is rooted in the history of html tables (html 3.2 and html 4) and mutual 
reverse engineering by different browsers.
IE < 8 handling of tables is more often than not contrary to specs.

Philippe
--
Philippe Wittenbergh
http://l-c-n.com/






______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to