Css html tables left and right borders
I am trying to write some css that will make my html table only have borders horizontally, and no borders vertically between columns.
here is what I have so far:
@charset "utf-8";
/* CSS Document */
<style type="text/css">
box-table-a{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
margin: 45px;
width: 480px;
text-align: left;
/*border-width: 0px;
border-left: 0px;
border-right: 0px;*/
border-collapse: collapse;
}
#box-table-a th{
font-size: 13px;
font-weight: normal;
padding: 8px;
background: #b9c9fe;
border-right:1px solid #b9c9fe;
border-left:1px solid #b9c9fe;
border-top: 4px solid #aabcfe;
border-bottom: 1px solid #fff;
color: #039;
}
#box-table-a td{
padding: 8px;
background: #e8edff;
border-bottom: 1px solid #fff;
color: #669;
border-top: 1px solid transparent;
}
#box-table-a tr:hover td{
background: #d0dafd;
color: #339;
}
</style>
The result is a table with white borders on all sides. Any ideas what I am doing wrong?
EDIT I can get it to do what I want here: http://jsfiddle.net/QZwt5/26/ but when I take this exact table and the exact css in Dreamweaver and then ftp to my server, I still get thin white lines between each cell. image http://img267.imageshack.us/img267/9135/temppb.jpg
Also noticed that if I turn off the normalized in the fiddle so the borders are displayed on the table.
Everything works on ubuntu server, I build it in winXP and then ftp to apache, so there might be some resolution issues preventing CSS?
source to share
This can be achieved simply with CSS
Html
<table border="1" id="table">
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
<tr>
<td>Row 2, cell 1</td>
<td>Row 2, cell 2</td>
</tr>
<tr>
<td>Row 3, cell 1</td>
<td>Row 3, cell 2</td>
</tr>
</table>
CSS
tr {
border: 1px solid black;
}
td {
border: 0;
width: 100px;
}
Live example
source to share