1 reply [Last post]
janna30
Offline
newbie
Last seen: 15 years 47 weeks ago
Timezone: GMT+6
Joined: 2003-10-28
Posts: 1
Points: 0

Hi there! I am trying to define borders for css cells-- and have done so with success before, but for some reason it is not working this time around in netscape, mozilla or IE. Does anyone know what error I am making?

This is the CSS specifically for the cells with borders.

.linestop { background-color: #339900; border-bottom: 1px solid #000000; border-top: 1px solid #000000; border-right: 0; border-left:0; }

I have nothing defined for table.

This is the HTML for the tables/cells:

<table width="100%" align="center" cellspacing="0" class="linestop">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>

Any ideas? Thanks!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 2 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Without Borders

Hi janna30,
You need to target the "TD" as well as the table when working with borders.
Try using .linestop td{ background-color: #339900; border-bottom: 1px solid #000000; border-top: 1px solid #000000; border-right: 0; border-left:0; }

Hope that helps