red, underscore hack - yellow, star hack - blue

The inline CSS is:

        	.box {
        	    background: red; /* normal browsers */
        	    *background: blue;  /* IE 6 and 7 */
        	    _background: green; /* IE6 */

Clicking the button creates a new style tag and sets the cssText property to the same definition. Effectively, it sets the same style again. Everything should look the same.

The surprise is that IE8 (even in "IE8 standards" mode) behaves like IE7. But only when creating a new <style> tag. When you update the style="background..." attribute, IE8 behaves as expected, ignoring the hack.

Comments? Blog post here...