Quote:
Originally Posted by CHEWX
Ok, regardless of the illegal ID use. This wouldn't work then ?
As I would be using #main :nth-child(2n) which would then select every second template within, which I don't want. I want it to select every second of a certain class (or in my case ID).
|
Code:
#article-inspir:nth-child(2n)
hits both
Code:
<article id="article-inspir" class="drop-shadow curved curved-hz-1">
i will say however, that you shouldn't actually need to use scripts for this.
simply use CSS to add clear:both to the same selector, or use :after content if you really need to inject a styled block.
in general with these sort of problems, just try out different permutations in the firebug or dev tools console until you hit the tags you want.