...

View Full Version : Table and Cell Borders



AmitB
05-20-2009, 11:45 AM
Hi,
I have a table with a border, and what I'm trying to achieve is having a couple of rows with a different border, or with no border at all.

The problem is that I couldn't achieve that in IE. In the following example, FF has a blue border all around the second row. In IE, however, the edges of that row, left and right, kept the table's black border. How can I "run over" the table border in IE?

table.tmp
{
border-left: 1px solid black;
border-right: 1px solid black;
border-collapse: collapse;
width: 30%;
}
table.tmp td
{
border-bottom: 1px solid black;
border-top: 1px solid black;
width: 50%;
}
tr.SomeBorder td
{
border: 5px solid blue;
}

<table class="tmp">
<tr>
<td>a</td>
<td>b</td>
</tr>
<tr class="SomeBorder">
<td>c</td>
<td>d</td>
</tr>
</table>

VIPStephan
05-20-2009, 11:58 AM
You could not give your entire table a border but all cells in that table. What I mean is that the first cell in each row gets a left border and the last cell gets a right border. The cells in the topmost row would also get a top border etc. This would simulate a border all around the table and you can change the color for certain cells as you like.
Not very elegant but it should work.

AmitB
05-20-2009, 01:58 PM
Yeah, I thought about it, but hoped there might be a more elegant solution. But I guess that's just how it goes with IE.
It does work, thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum