Demo
Due to the nature of the bug, the demo is available on a separate page
- HTML Code:
div {
width: 200px;
padding: 50px;
margin: 0 auto;
background: #ddd;
}
* html div {
background: #00f;
}
- CSS Code:
<div></div>
Since <html> element is considered the root element by sane browsers, there's nothing to select above it with universal selector (the star). For that reason the * html is ignored by sane browsers but what happens in IE6 is that the universal selector is ignored when it's the first part of the selector, therefore, for IE6 it simply becomes html.
Our * html div selector is ignored by sane browsers and in IE6 it becomes html div, which is more specific than the previous div selector and that effectively causes our <div> to obtain blue color in IE6 specifically.