I have a problem that I believe has a simple fix, I just don't know how to fix it.
Let's say I have some divs ie
<div class="box-1"></div>
<div class="box-2"></div>
<div class="box-3"></div>
<div class="box-4"></div>
and etc.
If these fields should be alternating colors. I need to create some css that basically does the following:
.box-(odd-number) {
color:#000;
}
.box-(even-number) {
color:#fff;
}
Obviously, I know that this is not the correct syntax. Can someone point me in the right direction.
thanks
source
share