I am trying to style odd and even headers that are associated with content. They are inside several DIVs, and I am unable to get nth-child or nth-of-type to work- only the
Try this
.content div.post:nth-of-type(odd) a{color: #444;} .content div.post:nth-of-type(even) a{color: #ccc;}
The a element of odd and even divs with post class. Not quite sure if that's what you need. A working example: http://jsfiddle.net/a4j7z/