I wonder if it is possible either by just css, or css backed up by javascript or something, to have alternating background colours for message ids on a dynamic page.
It's for a modification of SMF that has nothing to distinguish each reply other than a generated message id (#msg2, #msg3, #msg4 and so on) which I can create a rule for. I suppose I could create a stylesheet with like a gazillion rules for every numbered reply, but I wondered if I could create an odd and even system that would mean only 2 rules.
in other words, rather than doing this:
#msg1
{
background-color: #999;
}
#msg2
{
background-color: #666;
}
#msg3
{
background-color: #999;
}
#msg4
{
background-color: #666;
}
can I do something along the lines of:
#msg(odd)
{
background-color: #999;
}
#msg(even)
{
background-color: #666;
}
?
Any help would be deeply appreciated.