I'm having problems trying to style div tags on my code, you can check in the following jsfiddle what I have.
CSS
.container {
width: 200px;
margin: 0 auto;
}
.item {
line-height: 25pt;
border: solid 1px black;
}
.container div:nth-of-type(odd) {
background: red;
}
.container div:nth-child(odd) {
background: blue;
}
HTML
<ul class="cb-list">
<div class="container">
<li>
<div class="item">
<div class="detail">
First Record
</div>
</div>
</li>
<li>
<div class="item">
<div class="detail">
Second Record
</div>
</div>
</li>
</div>
</ul>
I'm using a tool that is generating the code automatically, so I'm not able to change this code. I have tried with using nth-of-type and nth-child both with odd and even but no luck yet. Any help would be appreciated. Thanks.
`. Only a `- ` can