Saturday, 24 August 2013

CSS :selector doesn't work with different tags?

CSS :selector doesn't work with different tags?

Say I have
<div class="myClass">
<div class="child"></div>
<span class="child"></span>
<a class="child"></a>
</div>
If I use
.child:first-of-type { /* Code here */ }
Then all three tags get the CSS code since they are all of different
types. Is there a way of still using this selector but with different
tags?

No comments:

Post a Comment