* Graham Cook [EMAIL PROTECTED] on [24-10-05] wrote:
> Your problem cannot be solved without adding a class to the cells you want
> to have with the border-top. The basic problem is that IE doesn't recognise
> child selectors. Refer my example below. Ffox will show the first td with
> red top border, IE does not show the border. If you add a class="firstrow"
> to the cells you want with a border then the style "tr td.firstrow" will
> change the borders to green in both FFox and IE (as this has higher
> specifity than " tr:first-child td". If however you use the style
> "td.firstrow" then IE will show the border in blue and FFox will show the
> top border in red.
>
> <style>
> table{
> width:100%;
> border: 1px solid gray;
> border-collapse: collapse;
> }
> td{border: 1px solid gray;}
> tr:first-child td{border-top:5px solid red;}
> tr td.firstrow {border-top:5px solid green;}
> /*td.firstrow {border-top:5px solid blue;}*/
> </style>
>
> Hope this clarifies your problem.
Hi Graham,
Thanks for the example. Its a shame that IE doesnt support direct
styling of tbody...
I didnt want to alter my markup to apply a class to each cell in the
first row of the tbody, so I used the IE7 JS to make IE understand
first-child. (http://dean.edwards.name/IE7/)
I have added an example of this in action on my original test page:
http://sindar.net/tabletest.html
What is the groups opinion of the IE7 JS library? Good thing? Bad
thing?
Does anybody have the "real" IE7 (the beta from Microsoft)? It would
be interesting to see how it renders my test page.
Thanks,
Brian.
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/