Saturday, 31 August 2013

How to target individually nested elements using CSS

How to target individually nested elements using CSS

I'm trying to target each span individually in a structure like below.
I've tried nth-child() & nth-of-type() but I've have no luck, it was only
applying the first style to all of the spans. Anyone no know how to do
this without giving each a separate IDs?
<div>
<div>
<span></span>
</div>
<div>
<span></span>
</div>
<div>
<span></span>
</div>
</div>

No comments:

Post a Comment