As you will see if you load the page below... In IE6 the div remains 
red, even though it is explicitly set to green in the last rule.

It seems that the middle rule, which targets a non-existant class is 
causing the problem. Remove that, and the div is green, even in IE6.

Note: If instead of using the additional class selector in the last 
rule, I just use the id, then this problem also goes away.

Has anyone ever experienced this issue? Is there a workaround?



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Untitled</title>
        <style>
        #testDiv {
                background-color: red;
                color: #fff;
                font-size: 2em;
        }

        #testDiv.nonExistantClass {
        }

        #testDiv.foo {
                background-color: green;
        }
        </style>
</head>
<body>
        <div id="testDiv" class="foo">
                This DIV should have a GREEN background. But it doesn't in IE6
        </div>
</body>
</html>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to