Given this HTML:

    <div class="ie7-target-class"> ... </div>

and this CSS:

* div[class^="ie7-target-class"] { background: #ff0000; }
body .ie7-target-class { background: #0000ff; }


The resulting div  shows red in IE7 but shows blue in all other browsers.

This is due to the fuzzy specificity bug which is still present in 
IE7 and the ability to prevent other browsers that also suffer from 
the fuzzy specificity bug from seeing the rule by using CSS3 
selectors.

     http://www.fu2k.org/alex/css/hacks/fuzzyspecificity


I've only been able to test this in IE7b2, so if anyone is using the 
public beta or later, could they confirm that the results are the 
same.

Disclaimer: just because you can hack IE7, doesn't mean you should: 
a) the IE7 team will probably fix this (though who can say when); b) 
the IE7 team is adamant that you should use conditional comments 
instead of hacks.

Disclaimer 2: if you really really do want to hack for IE7, you 
should also have a look at Brothercake's XXX method

    http://www.brothercake.com/site/resources/reference/xxx/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to