I want to make some boxes have different properties based on whether they're the odd or even number box in the group but only for a selector of multiple classes: But it's including the original box
class's object despite it not being in the CSS selector for nth-child:
<div class="box">1</div>
<div class="box special">1</div>
<div class="box special">1</div>
.box
{
width: 100px;
height: 50px;
background-color: #e3e3e3;
}
.box.special:nth-child(odd)
{
background-color: red;
}
.box.special:nth-child(even)
{
background-color: blue;
}
The third box should be blue, but it's red! And the second should be red, but it's blue!