1.

How to apply one set of styles to be applied to Internet Explorer and another set to be applied to other browsers.

Answer»

You can USE Microsoft Internet Explorer CONDITIONAL comments to load a style sheet created exclusively for Internet Explorer. You can place a conditional comment in <HEAD> after all LINKS to other style sheets. Inside the conditional comment, you can place a link to a style sheet. I call this the conditional style sheet. Since the conditional stylesheet comes last, it overrides previously loaded styles. You can create a separate conditional stylesheet for Internet Explorer 6, and if necessary you can create one for Internet Explorer 7. You can include styles in this stylesheet to compensate for different behaviors and bugs.

The following pattern loads two conditional style sheets. The first is for Internet Explorer versions 6 and earlier. The second is for Internet Explorer 7 and higher. Internet Explorer 7 fixes most of the bugs in Internet Explorer 6, but there are still a number of CSS features that it does not implement, such as the content property.

HTML

<!--[if lte IE 6]> <link rel="stylesheet" HREF="ie6.css" media="all" type="text/css" /> <![endif]--> <!--[if gt IE 6]> <link rel="stylesheet" href="ie.css" media="all" type="text/css" /> <![endif]-->


Discussion

No Comment Found