Forum Moderators: open

Message Too Old, No Replies

table border thickness not right

         

tesla

7:35 pm on Jul 8, 2002 (gmt 0)

10+ Year Member



How can I get the border around the table below to be only one pixel thick? Notice that the Horizontal line below it is one pixel....why isn't the table? try it and see.

<table width="30%" border="1" cellspacing="0" cellpadding="0">
<tr><td>&nbsp;</td></tr>
</table>
<hr size="1">

Thanks, Bruce

moonbiter

8:40 pm on Jul 8, 2002 (gmt 0)

10+ Year Member



Assuming you are not opposed to CSS:

table, table td {
border-width: 1px;
border-style: solid;
border-color: [insert favorite color here]
border-collapse: collapse;
}

You can then safely remove the border attribute from the table.

Best you can do, even though it won't work in Netscape 4.x But what does?

Note you can shorten the border declaration to something like "border: 1px solid #000;" too.

Truthfully, you could also get away with just selecting "table td" (instead of "table, table td") . But what fun is that?