CSS issues with IE7

Dec 10, 2006 15:15

With the release of IE7, a lot of hacks to make your styling work cross-browser have been fixed, notably * html tag {CSS code}.
/* Comment comment \*/ CSS /* comment comment */ still works to limit the CSS code to IEwin and IEmac, however. But a solution exists to still get around all this.

In your actual markup, you can add:
(The ! is excluded in the comment markup.)

<--[if IE7]-->
(Link a special extra css file here.)
<--[endif]-->

To only read that linked CSS file if the user's browser is IE7.x. Of course, you can also:

<--[if IE6]-->
etc.

Also. Same goes for 5.x and such.

Reference:
http://www.positioniseverything.net/articles/ie7-dehacker.html
Previous post Next post
Up