On 1/25/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote:

Actually, you can use conditional comments around any HTML (but only HTML)


That means that both of these are valid:

<style type="text/css">
   #foo {
       /* do stuff for every browser...*/
   }
</style>

<!--[if lte IE 6]>
<style type="text/css">
   #foo {
       /* do stuff that only IE versions 6 and below will see...*/
   }
</style>

<!-- This stylesheet affects all browsers -->
<link rel="stylesheet" type="text/css" href="/css/default.css" />
<!-- This stylesheet can be seen only by IE versions 6 and below -->
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="/css/ie6.css" />
<![endif]-->

I don't recall whether IE Mac can read conditional comments, but it
shouldn't matter much considering it's pretty much dead and gone by now.

It's also a good idea to put conditional comments after your main styles (as
everyone's examples have done) so that the IE specific rules will properly
override the main ones.

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to