using nth-child in tables tr td

css, css-selectors

Solution

table tr td:nth-child(2) {
    background: #ccc;
}

Working example: http://jsfiddle.net/gqr3J/

Problem

``` <table> <tr> <th>&nbsp;</th> <td>$</td> <td>&nbsp;</td> </tr> <tr> <th>&nbsp;</th> <td>$</td> <td>&nbsp;</td> </tr> <tr> <th>&nbsp;</th> <td>$</td> <td>&nbsp;</td> </tr> <tr> <th>&nbsp;</th> <td>$</td> <td>&nbsp;</td> </tr> <tr> <th>&nbsp;</th> <td>$</td> <td>&nbsp;</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?

Original source