I have 2 divs which are similar to 2 td's
in a table. My goal is to have 2 red divs, followed by 2 blue divs and so on. However, my current code doesn't seem to be working. Can someone point out what I am missing:
<style>
.irow :nth-child(4n+0), .irow :nth-child(4n+1) {
background-color: blue;
}
.irow :nth-child(4n+2), .irow :nth-child(4n+3) {
background-color: red;
}
</style>
<div class="irow">
<div class="col-md-8">Inès va morfler grave</div>
<div class="col-md-4">Tête</div>
<div class="col-md-8">Inès que des mots !</div>
<div class="col-md-4">Pompon</div>
</div>