Picnic Website Code Tutorials

How To Feed Rules Only To Internet Explorer Tutorial

Here is the updated page on ways to target IE! I like to place my IE specific rules in a seperate ie6.css or ie7.css. This way, five years from now when the browser is dead, I can simple remove the link and the extra ie.css file. This is much better than having to comb through your css and html to find all your IE hacks. Alternativly, you can place them in the <head>, or feed them to IE6 with the * html hack - whatever floats your boat. Below are all three methods to feed specific rules to IE6. A more detailed description for feeding rules only to IE6, and to all other versions of IE, can be found here, here, and here.

* html #div { /* all except IE6 will ignore this */
IE: specific rules;
}

/* or in the <head> */

<!--[if IE 6]>
<style type="text/css">
/* IE Specific styles here */
</style>
<![endif]-->

/* or preferably and also in the <head> */

<!--[if IE 6]>
<link href="ie6.css" rel="stylesheet" type="text/css" media="screen">
<![endif]-->
		

Sponsors

Top Donators

Friends of Mine