PDA

View Full Version : CSS linking border



Lastaut
06 Aug 2009, 02:24 PM
If I don't want to use the "border=1" attribute in a table, is there a way to link in a border from a css style page?

I have tried .border {border:1px;}
.border {border-width: 1px;}/{border-width: solid;}

nothing is passing to the webpage with the class attribute to a table.

Wickham
06 Aug 2009, 02:35 PM
With CSS styling for tables you have to style the border separately for the table perimeter and then again for the td tags

table { border: 1px solid red; }
td { border: 1px solid black; }

You can then style the td tags individual sides like td { border-right: 1px solid black; }
or create a class just for one or two td tags.