Div odd and even : <p>I have a problem that i believe to have a simple fix I just don't know the fix myself.</p>

<p>Say i have some divs i.e.</p>

<pre><code>&lt;div class="box-1"&gt;&lt;/div&gt;
&lt;div class="box-2"&gt;&lt;/div&gt;
&lt;div class="box-3"&gt;&lt;/div&gt;
&lt;div class="box-4"&gt;&lt;/div&gt;
</code></pre>

<p>etc.</p>

<p>If these boxes need to be alternate colours. I need to create some css which basically does the following:</p>

<pre><code>.box-(odd-number) {
    color:#000;
}
.box-(even-number) {
    color:#fff;
}
</code></pre>

<p>Obviously I know the above is not the correct syntax. Could some one point me in the right direction.</p>

<p>Thanks</p>
