Forum Moderators: not2easy

Message Too Old, No Replies

Style for td that belongs to a table

         

silverbytes

7:39 pm on Sep 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a css style called "tabla-precios" and need that text inside some of td in that table (without class aplied)
be .85em size.

Is there a way to define the "td" but only those (not other td tags in document)?

tried but didn't work, .tabla-precios.td {
font-size: .85em;
}

My code:


<table align="center" cellpadding="3" class="tabla-precios">
<tr>
<th nowrap ><h3><strong>Bla </strong></h3></th>
<th nowrap >Text</th>
<th >Text2 </th>
</tr>
<tr class="tabla-x">
<td nowrap >$ bla bla</td>
<td nowrap>$ bla </td>
<td nowrap> $ bla </td>
</tr>
<tr>
<td >bla</td>
<td>$ bla </td>
<td>$ bla </td>
</tr>
<tr class="tabla-x">
<td>more bla<b></b></td>
<td nowrap>$ bla</td>
<td nowrap>$ bla </td>
</tr>
</table>

Basically I define the tabla-precios style and tabla-x to change rows color but text should be the same size.

jetboy

12:38 am on Sep 2, 2005 (gmt 0)

10+ Year Member



.tabla-precios td {
}

Known as a descendant selector.

silverbytes

3:43 pm on Sep 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cool answer!