How can I target the second <span>
in the div (Rättsmål), and make it red? I dont want massive amout of extra classes.
<div class="subjects_container">
<div> <span>1</span><span>Rättsmål</span><span></span> </div>
</div>
I tried the following, but it made both “1”, and “Rättsmål” red.
.subjects_container:nth-child(2) {
color: red;
}
I also tried, no success.
.subjects_container > div:nth-child(2) {
color: red;
}