Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add a border on table row

Status
Not open for further replies.

dee2005

Programmer
Sep 11, 2005
29
GB
Hey

I am trying to add the border strictly on the table row

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<th>First name</th>
<th>Last name</th>
<th>E-mail</th>
<th>Company</th>
<th>Business e-mail</th>
<th cols="2">Website</th>
</tr>
<tr class="EvenRow">
<td>Lorem</td>
<td>Ipsum</td> <td>uksales@bwspea</td>
<td>Phasellus lorem</td <td>Vivamus molestie.com</td> </tr>
<tr id="SelectedRow">
<td>Lorem</td>
<td>Ipsum</td>
<td>uksales@bwspea</td>
<td>Phasellus lorem</td>
<td>Vivamus molestie.com</td>
</tr>
<tr class="EvenRow">
<td>Lorem</td>
<td>Ipsum</td>
<td>uksales@bwspea</td>
<td>Phasellus lorem</td>
<td>Vivamus molestie.com</td>
</tr>
</table>

is this possible I tried tr td - yes that works, but I dont want the border on all the td.
table{
float:left;
width:746px;
font-size:100%;
}

table th{
background-color:#666666;
color:#ffffff;
height:24px;
text-align:left;
text-indent:12px;
border-right:1px solid #ffffff;
width:158px;
}
table td{
padding-left:12px;
border-right:1px solid #ffffff;
}

.EvenRow td{
background-color:#eaeaea;
}

#SelectedRow td{
border-top:1px solid #000000;
border-bottom:1px solid #000000;
border-right:none;

}

#SelectedRow {
border-left:1px solid #000000;
}
 
Table row (tr) is like an invisible container for table cells and as such ignores all the styling. However, if you just give your table cells bottom border and your table itself a border, that should cover you for having borders around every table row.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Dan

I am trying to add #SelectedRow border
 
I am trying to add

border-top, border-bottom, border-left and border-right of the entire row
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top