<table>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
</table>
Here is my code, I want <td>
s with "$" with a background of #CCC
in all the <tr>
s.
Can any one help me how to do this using nth-child
, pseudo classes?
table tr td:nth-child(2) {
background: #ccc;
}
Working example: http://jsfiddle.net/gqr3J/