html - css first child doesn't work on my <li> -
this question has answer here:
- css selector first element class 15 answers
css
.list-group-item:first-child{ border-top: none !important; }
html
<li class="list-group-item" ng-repeat="user in data"> {{user.name}} </li>
what's wrong first-child?
demo here http://plnkr.co/edit/fkxdsjrc9eu4tin9upmy?p=preview
you change in 2 ways:
a) use on li (as now) use first-of-type
b) nest li's in ul class="example" (which supposed do) , do
.example:first-child{ border-top: none !important; }
(your example edited: http://plnkr.co/edit/qtladqpxfdg3w6onyex4?p=preview)
Comments
Post a Comment