The problem is that while IE applies the class to the child, it doesn't apply the class to the parent as well.
Example 1:
The following rule:
DIV#white {color: white;}
Applies color: white; to both DIV tags in the document with the id as well as child elements of the DIV with id "white":
<div id="white">this is white <span id="white">this is also white</span>
However, if you change the rule just slightly (notice the space):
DIV #test {color: white;}
This rule applies color: white;
only to the child elements of any DIV tag. So:
<div id="white">this is not white <span id="white">this is white</span>
Now, that was using tag and id. My problem is with id and class. So Example 2:
The following rule:
#div.white {color: white;}
Applies color: white; to tags with id "div" AND class "white" in the document as well as child elements of the tag with class "white" (regardless of id):
<div id="div" class="white">this is white <span class="white">this is also white</span>
However, if you change the rule just slightly (notice the space):
#div .white {color: white;}
This rule applies color: white;
only to the child elements of any tag with id "div". So:
<div id="div">this is not white <span class="white">this is white</span>
Perhaps this is a flaw in the syntax of CSS. As far as I know, there is no way to exclusively limit a rule to a single tag with BOTH id and class (or tag, id and class). Anyway, all is well and good until you add more than one class rule. Example 3:
The following rule (in IE only):
#div.white {color: white;}#div.blue {color: blue;}
Applies color: white; to tags with id "div" AND class "white" in the document as well as child elements of the tag with class "white" (regardless of id). Ignores the second rule:
<div id="div" class="white">this is white <span class="white">this is also white</span>
<div id="div" class="blue">this is black (default) <span class="blue">this is also black (default)</span>
If you change the rule just slightly (notice the space):
#div .white {color: white;}#div .blue {color: blue;}
This rule applies color: white;
only to the child elements of any tag with id "div" AND it applies color: blue; to the child elements of any tag with id "div". So:
<div id="div">this is not white <span class="white">this is white</span>
<div id="div">this is not blue <span class="blue">this is blue</span>
Hmm.. I think that's clear.