Click to See Complete Forum and Search --> : Need 2 diff styles for the same <td> tag


ryanmkilt
09-30-2008, 09:34 AM
I have two different tables. I want to use 1 style on the <td> tag on one table, and another style on the <td> of another table. How do I do this?

Fang
09-30-2008, 09:44 AM
Give the tables different id or class.tableA td {color:red;}
.tableB td {color:blue;}

ryanmkilt
09-30-2008, 10:00 AM
I have:

td {border: solid #000 1px; width: 150px}

.norm td {color: black}

<table align="center" padding="3" border="0">
<tr height="40">
<td class="norm">

This isn't doing anything, do you know what I'm doing wrong?

cbVision
09-30-2008, 10:04 AM
You don't need the td unless you apply it to a higher up element such as the tr or table tags. Try .norm {color: #000;}

cbVision
09-30-2008, 10:05 AM
Also keep in mind that the color property is for the text in a TD. If you want the background changed for that cell, .norm {background: #000; color: #fff;} black bg white text