Even after simplifying my code significantly, I am still facing issues with it not working as expected. The :nth-child selector seems to work fine on the w3schools interactive coding page, ruling out any computer-related problems.
.postPrevWrap:nth-child(odd) {
background: red;
}
<div class="postPrevWrap">
<div class="postPrev">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
<div class="postPrev">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
https://codepen.io/anon/pen/dQzYwj
Could someone please point out what I might be doing incorrectly?