What Is the Scope of the * CSS Hack

What browsers and versions does the * CSS hack apply to?

This applies to IE7 and below. But be aware that this is not valid CSS, and it could break at any time. See here for a more comprehensive list of the various CSS hacks and which browsers they affect.

Although Internet Explorer 7 corrected its behavior when a property name is prefixed with an underscore or a hyphen, other non-alphanumeric character prefixes are treated as they were in IE6. Therefore, if you add a non-alphanumeric character such as an asterisk (*) immediately before a property name, the property will be applied in IE and not in other browsers. Unlike with the hyphen and underscore method, the CSS specification makes no reservations for the asterisk as a prefix, so use of this hack could result in unexpected behavior as the CSS specifications evolve.

I'd strongly recommend reconsidering whether you really need this hack, and if there isn't a better way to do what you want.

*display css hack?

This is a hack to target IE7 it will not be picked up by modern browsers such as Firefox or Chrome, IE>8. So for instance, IE7 would display the element as inline, while others would ignore this style and display the UL appropriately as a block level element.



Related Topics



Leave a reply



Submit