html - css first child doesn't work on my <li> -


this question has answer here:

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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - WPF+EF - The operation cannot be completed because the DbContext has been disposed -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -