I recently discovered the CSS3 :nth-child() Selector and decided to create a sample
Here is the HTML snippet:
<body>
<div> <label>dsdf</label></div>
<div>seconddiv</div>
</body>
And here's the CSS part:
label.nth-child(1){
background: #ff0000;
}
Despite setting the background of the label to red, it remains unchanged. What could be causing this issue?