Forums
This topic is locked
Adding row border to table with CSS
08 Jan 2008 19:13:16 Alan C posted:
I would like to add a border to table rows with CSS, I thought this would be simple, but it's not proved easy so far. I've searched around and tried various things without success.I thought this would work . . .
in the html there is a normal table with id set to publications, various rows and td elements as needed
<pre id=code><font face=courier size=2 id=code>table#publications tr {
border:solid silver 1px;
} </font id=code></pre id=code>
but no row borders, if I edit the tr to td the borders show up on the tds fine
any feedback appreciated
Replies
Replied 10 Jan 2008 00:08:03
10 Jan 2008 00:08:03 Javier Castro replied:
The code you have works in FF and Opera but doesn't on IE. It could be a bug on IE 7 and older.
Perhaps a conditional CSS for IE would do the trick. Check this out: www.csarven.ca/tr-border-trick-for-ie
probably you saw this before.
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
Cheers,
Javier
Edited by - am7555 on 10 Jan 2008 04:10:04
Perhaps a conditional CSS for IE would do the trick. Check this out: www.csarven.ca/tr-border-trick-for-ie
probably you saw this before.
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
Cheers,
Javier
Edited by - am7555 on 10 Jan 2008 04:10:04
Replied 10 Jan 2008 10:47:06
10 Jan 2008 10:47:06 Alan C replied:
thanks, I'll give it a try, on the particular page I worked around the problem by getting rid of the table and using divs instead, as far as the purity of the css solution goes that's better, but . . . I have to hand this on to a client who will maintain it and she might not be so familiar with css and the coding.