Placement of IE comments?

DreBeltrami

New Member
I am trying to move all the css and .js coding to external files and I ran into a question...

Where should I put any comments and special coding for older IE versions? Should those comments stay in the head of the .html or can I add those to the external .css file I have?

I tried combining those into the external file, but my page went haywire, so I assumed this wasn't the right approach. Can someone assist me on placement?

Thanks!

http://www.manriquezconstructioninc.com/testing_style.html
 

LouTheDesigner

New Member
While I normally don't like to use a workaround, it DOES go inside the <head> tag.

Put them in external javascript and style sheets, and then refer to them in your HTML as follows:

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

In this case, the css file is names ie6.css, of course. I know, you're thinking I used comment tags so the browser will ignore it. However, IE has been programmed to recognize this code.

In recent years (thankfully) IE has supposedly dropped down to the second most-used browser, according to w3schools.

-Lou
 
Top