...

View Full Version : CSS Table Class Help



spires
05-28-2009, 12:08 PM
Hi Guys.

This should be simple for most of you.
I've got 10 tables, 9 with a border and 1 without.

However, using CSS I can't seem to do both.

Here my CSS code:


table
{
border-width: 0 0 1px 1px;
border-spacing: 0;
border-collapse: collapse;
border-color: #CCC;
border-style: solid;
}

td
{
margin: 0;
border-width: 1px 1px 0 0;
padding-left:5px;
padding-right:5px;
border-color: #CCC;
border-style: solid;
}

TABLE.border
{
border-collapse: collapse;
empty-cells: show;
border: 0px;
padding: 0px;
margin: 0px;
}

TD.border
{
padding: 4px;
margin: 0;
}



Here is the table code that I don't want to have a border:


<table class="border" width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>



Any help would be great :)

abduraooft
05-28-2009, 01:50 PM
<table class="noborder" width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>

table, td{
border:1px solid #000;
border-collapse:collapse;
}

table.noborder, table.noborder td{
border:none;
}

PS: Are you using tables for making your layout? If so, read http://www.hotdesign.com/seybold/ first.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum