...

View Full Version : Table Borders



<(^^<)KIRBY
02-07-2005, 11:59 PM
Is there a way to take a simple, basic table, and make it so that it has borders on the sides, (aka, between each cell) and not have any on the top? So, in essence,

data1 | data2 | data3 | data4
data1 | data2 | data3 | data4

Thanks

_Aerospace_Eng_
02-08-2005, 12:14 AM
<table>
<tr>
<td style="border-right:1px solid #000000;">Data 1</td>
<td style="border-right:1px solid #000000;">Data 2</td>
<td style="border-right:1px solid #000000;">Data 3</td>
<td>Data 4</td>
</tr>
<tr>
<td style="border-right:1px solid #000000;">Data 1</td>
<td style="border-right:1px solid #000000;">Data 2</td>
<td style="border-right:1px solid #000000;">Data 3</td>
<td>Data 4</td>
</tr>
</table>
u can mess around with cellpadding and cellspacing

ronaldb66
02-08-2005, 09:35 AM
If you don't use inline styles, but instead place style rules either in an internal or an external style sheet, you reduce the volume of code and be more flexible at the same time.
In the -default- collapsing border model, it would suffice to set all left and right borders for every table cell:

td {
border: 1px #000;
border-style: none solid;
}
The "double" border in between two cells should collapse to a single width.
Alternatively, you could set left borders only on the table cells, and set a right border on the table rows (left and right interchangable):

tr {
border-right: 1px solid #000;
}

td {
border-left: 1px solid #000;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum