html - css class inside first class selector -
i have following html code
<div class="span3"> <div class="abc">code fist div</div> <div class="abc">code second div</div> </div>
i need hide first division inside span3 division using external css. since have used span3 in other places too, have specify division class abc when selecting without saying first child division.
so how can select first abc division within span3 ?
you can achieve following style
div.span3 div.abc:first-child { color: red; }
<div class="span3"> <div class="abc">code first div</div> <div class="abc">code second div</div> </div>
Comments
Post a Comment