Internet Explorer is a fickle browser that often doesn’t cooperate with CSS rules like most other browsers do, which can really make the styling of certain elements a problem. To remedy this, you may sometimes choose to include a separate stylesheet that will load ONLY when the browser is Internet Explorer. An easy way to do this is to include conditional comments in the <head> section of your HTML files, like this:
- <!-- [if iE] >
- <link rel="stylesheet" type="text/css" href="path/to/IE/stylesheet.css" />
- <! endif -->
You can also use the above code to target certain versions of Internet Explorer. You just need to change the first line to specifically select the exact version of IE you want to target. For example:
Join us in our newest publication: