How do you define a table border in CSS? I'm trying to do a class to make the top and bottom border of my table be a single thin line and I'm having no luck:Code:.test {border: 0px;1px;0px;1px;}
Printable View
How do you define a table border in CSS? I'm trying to do a class to make the top and bottom border of my table be a single thin line and I'm having no luck:Code:.test {border: 0px;1px;0px;1px;}
Got it:
Code:.tbl {
border-top: 1px solid Black;
border-right: 0px solid White;
border-bottom: 1px solid Black;
border-left: 0px solid White;
}
Since you've specified no border on the right or left, the solid white is unnecessary, and infact can be shortened to the following:Quote:
Originally posted by ober0330
Got it:
Code:.tbl {
border-top: 1px solid Black;
border-right: 0px solid White;
border-bottom: 1px solid Black;
border-left: 0px solid White;
}
It'll load faster that way.Code:.tbl {
border: 1px 0px 1px 0px solid Black;
}
TG
Actually, your suggestion doesn't work at all, but I can take out the white borders and it works.