PDA

View Full Version : table borders



esthera
Jan 9th, 2007, 09:40 AM
I am trying to make my table that it will have a border underneath each row.

I did the following:

.baskettablenew{
padding:0px;
margin:0px;

}
.baskettablenew td{
border-bottom-width: thin;
border-top-style: none;
border-right-style: none;
border-bottom-style: solid;
border-left-style: none;

}

but the problem is the line is not straight -- there is a pixel in between each td even though I set padding to 0.

please advise

ronaldb66
Jan 9th, 2007, 10:05 AM
Which browser are you using? IE has some issues with table styling through CSS, so it may be necessary to still make use of the cellspacing attribute on the table element. Try setting this to zero (0). Also, make sure you don't have any other table attributes that may cause problems.

harbingerOTV
Jan 9th, 2007, 01:50 PM
also have you tried actually giving the border to the row itsself?


.baskettablenew tr{
border-bottom-width: thin;
border-top-style: none;
border-right-style: none;
border-bottom-style: solid;
border-left-style: none;
}

rmedek
Jan 9th, 2007, 04:54 PM
The pixel of space is probably due to the default border rule of tables… if you don't set it explicitly, the borders of each table cell don't collapse against each other. Try adding this to your stylesheet:

table {
border-collapse: collapse;
}