html5 - how can i use css selector to give style only to a first div between two divs of the same kind? -
i want give border first div class block in code below:
<div class="col-md-4 news"> <h3>news feed</h3> <div class="block"> <p class="date"><span>15</span>march</p> <p><a href="#">serving people 23 branches on nepal</a></p> <div class="clearfix"></div> </div> <div class="block"> <p class="date"><span>17</span>march</p> <p><a href="#">serving people 23 branches on nepal</a></p> <div class="clearfix"></div> </div> </div>
i suggest
.block:first-of-type { border: yourborder; }
Comments
Post a Comment