PDA

View Full Version : CSS Question


PichuSecretBase
November 26th, 2004, 12:20 PM
Okay Lets say I have a table and it is

<table class="contenttb"><td><td>Content!</td><td>MORE CONTENT!</td></tr></table>
and this in my CSS
.contenttb {
font-family: Verdana;
font-size: 10px;
color: #000000;
border:solid 1px #000000; }
Why does my table border only go around the edge and not between colomns and rows?

Lightning
November 26th, 2004, 08:39 PM
@_@ I just tested it out and this seems to work:

<table class="newtableclass"><td><td class="contenttb">Content!</td><td class="contenttb">MORE CONTENT!</td></tr></table>

.newtableclass {
border-collapse: collapse;
}
.contenttb {
font-family: Verdana;
font-size: 10px;
color: #000000;
border-width: 1px;
border-style: solid;
border-color: #000000;
}

^_^; The TD tags need to have their borders set individually. The "border-collapse" attribute basically gets rid of the cellspacing in-between.

PichuSecretBase
November 26th, 2004, 09:42 PM
Thankyou Lightning :3 *goes to do more work*

Dragonfree
November 27th, 2004, 07:03 PM
Change this:

<table class="contenttb"><td><td>Content!</td><td>MORE CONTENT!</td></tr></table>

to this:

<table class="contenttb"><tr><td>Content!</td><td>MORE CONTENT!</td></tr></table>

too.