Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping CSS from interfearing with a table

Status
Not open for further replies.

Lorindal

Technical User
May 17, 2005
2
US
i am attempting to create a webpage, so naturally i am using a CSS to make it appear "cool." However i also added a very specific table, that has very specific background colors. I attempted to remove asspects of the CSS that interfeared with that table. Naturally this resulted in other tables being affected, (those that i wanted the CSS to affect).

Now i am wondering if there is anyway to get the entire CSS or atleast parts of it to Ignore that particualr table.

Thanks -
Lorindal
 

You could give that table an ID, and add style to put only that table back to how you would like it to look.

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Thanks that got me going in the right direction.

This is a sample from the CSS for my site:

td.darkgreen {background-color: darkgreen;}
td.limegreen {background-color: limegreen;}
td.lime {background-color: lime;}
td.palegreen {background-color: palegreen;}
td.lightgoldenrodyellow {background-color: lightgoldenrodyellow;}
td.yellow {background-color: yellow;}
td.gold {background-color: gold;}
td.darkorange {background-color: darkorange;}
td.orangered {background-color: orangered;}
td.red {background-color: red;}
td.black {background-color: black;}
</STYLE>

and here is one section of my table:
<table align='center' width='250px' cellspacing='0' cellpadding='0' border='0'>


<tr><td class="darkgreen" height='5px' bgcolor=Darkgreen></td>
<td class="limegreen" height='5px' bgcolor=Limegreen></td>
<td class="lime" height='5px' bgcolor=Lime></td>
<td class="palegreen" height='5px' bgcolor=palegreen></td>
<td class="lightgoldenrodyellow" height='5px' bgcolor=lightgoldenrodyellow></td>
<td class="yellow" height='5px' bgcolor=yellow></td>
<td class="gold" height='5px' bgcolor=gold></td>
<td class="darkorange" height='5px' bgcolor=Darkorange></td>
<td class="orangered" height='5px' bgcolor=orangered></td>
<td class="red" height='5px' bgcolor=Red></td></tr><tr>

<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black></td>
<td class="black" height='10px' bgcolor=black>
<td class="red" height='5px' bgcolor=Red></td></tr>

<tr><td class="darkgreen" height='5px' bgcolor=Darkgreen></td>
<td class="limegreen" height='5px' bgcolor=Limegreen></td>
<td class="lime" height='5px' bgcolor=Lime></td>
<td class="palegreen" height='5px' bgcolor=palegreen></td>
<td class="lightgoldenrodyellow" height='5px' bgcolor=lightgoldenrodyellow></td>
<td class="yellow" height='5px' bgcolor=yellow></td>
<td class="gold" height='5px' bgcolor=gold></td>
<td class="darkorange" height='5px' bgcolor=Darkorange></td>
<td class="orangered" height='5px' bgcolor=orangered></td>
<td class="red" height='5px' bgcolor=Red></td></tr>
</table>


im just glad it is over.

-Thanks Again
--Lorindal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top