I\'m trying to apply nth-of-child style to table cells, but that don\'t work. According to my code I would like to have each 2nd cell content be right-aligned and has a gray col
There is no such thing as the :nth-of-child selector. You appear to have mixed the two :nth-child and :nth-of-type selectors together...
:nth-of-child
:nth-child
:nth-of-type
tr td:nth-child(2) { text-align: right; color: #ccc; }
DEMO.