As was said before, the order in the attribute will have NO EFFECT, however you did have a TYPO ( forgetting to close the quotes).
As raplh suggested, adding the inline style attr (color
will override any and all classes.
ALTERNATIVELY, since you said you were using JS anyway, you could TOGGLE the color class with JS so that only RED|YELLOW|GREEN is ever present at any given point. That would probably be the cleanest way to do it .
this is one of my scripts I use to toggle classes:
Code:
function toggle(obj, c){
oc=' '+obj.togs.className+' ';
ocInd=oc.indexOf(' '+c+' ');
if (ocInd>-1){
oc=oc.replace(' '+c+' ','');
obj.togs.className=oc.replace(/^\s\s*/, '').replace(/\s\s*$/, '')
}
else{obj.togs.className=obj.togs.className+' '+c;}
}
I think now we crossed in the JS forum territory. 
oh, incidentally as long as we are doing things properly your class names shouldnt really be named after color but semantic meanings; it will save a lot of headaches in the long run. consider using .urgent, .viewed, and .new as opposed to .red, .yellow, and .green
Bookmarks