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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -