In this bootply, I want every 3n+1 col-lg-4
to be cleared. It works when the col-lg-12
is not present but this defeats the purpose of nth-of-type no?
Can someone point out what I'm doing wrong here?
<div class="container">
<div class="row">
<div class="col-lg-12">col12 ignore</div>
<div class="col-lg-4">a</div>
<div class="col-lg-4">b</div>
<div class="col-lg-4">c</div>
<div class="col-lg-4">d</div>
</div>
</div>
.col-lg-4:nth-of-type(3n+1){
clear: left;
color: red;
}
Thanks in advance