Why is nth-child selector not working in css? [duplicate]
Why is nth-child selector not working in css? [duplicate] This question already has an answer here: I am using the nth-child selector to add border-color for different social list-group-item . What am I doing wrong? nth-child list-group-item .list-group-item:nth-child(1) { border-right: 3px solid yellow; } .list-group-item:nth-child(2) { border-right: 3px solid red; } .list-group-item:nth-child(3) { border-right: 3px solid green; } .list-group-item:nth-child(4) { border-right: 3px solid blue; } .list-group-item:nth-child(5) { border-right: 3px solid lime; } .list-group-item:nth-child(6) { border-right: 3px solid red; } <div class=" col-xs-12 col-sm-6 col-md-4 col-lg-6"> <div class="views-field views-field-title"> <span class="field-content list-group-item">Yahoo<a href="/app/wall/content/"></a></span...