id & class combo bug
IE6/Win (I don't know about other versions) has a bug that prevents perfectly valid
CSS declarations from being applied. When you declare multiple rules of the form
#idName.className { /* . . . */ }, IE only remembers the first one for each
set of rules with the same #idName.
#buggydiv.highlighted
{
background-color: #ffe;
color: #f00;
}
#buggydiv.lowlighted
{
background-color: #eee;
color: #aaa;
}
Test case 1:<div id="buggydiv" class="highlighted">ThisTest case 2:<div>should be red on yellow</div><div id="buggydiv" class="lowlighted">This<div>should be dark gray on light gray</div>
Drop the #idName part of the declaration:
.highlighted
{
background-color: #ffe;
color: #f00;
}
.lowlighted
{
background-color: #eee;
color: #aaa;
}