IE7 and IE8 hack behavior

We’ve had the luxury of hacks to fine tune Internet Explorer bugs. Internet Explorer 7 disabled the majority of hacks, with the exception of the * hack. This hack allowed you to send a style only to Internet Explorer by prefacing an attribute with an asterisk.


/*this is for all browsers*/
#main p {color:black;}
/* this is for Internet Explorer */
#main *p {color:red;}
/*this is ignored by IE7 and will target IE6 */
#main _p {color:green;}

This set of hacks allowed us to control IE7 and IE6. However, IE8 does not recognize the * hack. Special IE8 rules will either need to be defined with conditional comments, the Microsoft proposed meta tag, or some new hack to be discovered. Let’s hope the mature version of IE8 will reduce the need for these hacks.

For more information on the above hacks, visit an earlier post: IE7 Hacks

4 thoughts on “IE7 and IE8 hack behavior

  1. Pingback: (anti) IE8 CSS Hack at Boris Masis - Personal Homepage

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>