I have the following html
.resources .resource:first-child {
border-top: 1px solid #D9B310;
}
.resources .resource {
border-bottom: 1px solid #D9B310;
padding: 10px 0;
}
<div class="resources">
<h2 class="text-center">Ресурси</h1>
<div class="resource">
<h4>Минерали <span class="resource-quantity">3700</span></h3>
</div>
<div class="resource">
<h4>Газ <span class="resource-quantity">500</span></h3>
</div>
</div>
the selector without the first-child works fine. But the first-child selector it's not wrking in my case. Can someone tell me why ?