Previous Message
Next Message

Alternating row colors in table

Sent by Ricky Zhou on 5 September 2005 17:05


> I'd ideally like to apply the style to the <tr> tags rather than the <td>
> tags, but I'm not sure how to designate that in the css.  Is this
> possible?

Use
tr.odd td {}
amd
tr.even td {}

To select the td's that are children of the tr.

<tr class="odd">
<td>Text</td>
<td>Text</td>
</tr>
<tr class="even">
<td>Text</td>
<td>Text</td>
</tr>

Ricky
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: