HTML & CSS
I have got a oscommerce website and am having great difficulty getting IE to pick up the external IE CSS stylesheet
Not sure where I am going wrong
The coding linking the stylesheet is below
<link rel="stylesheet"type="text/css" href="allieonly.css" />
The css stylesheet starts with the following
<style> and ends with </style>
Where am I going wrong with it
There are three problems with your code above.
Firstly your closing conditional comments are malformed and they should be like this:
Secondly the css stylesheet should not contain style tags. The stylesheet can contain only css and css comments. Style tags are html not CSS.
Thirdly, it is highly unlikely that you want to target all IE as IE8+ are pretty good and need few hacks. You should send the hacks to ie7 and below only.
<!--[if lte IE 7]>
<link href="iecss.css" rel="stylesheet" type="text/css" />
If you need ot target IE8 or IE9 then do it specifically.
<!--[if IE 9]>
<link href="ie9ss.css" rel="stylesheet" type="text/css" />
<!--[if IE 8]>
<link href="ie8ss.css" rel="stylesheet" type="text/css" />
However, in most layouts you will seldom need to target IE9 and in most cases you could live with the differences anyway.
This topic is now closed. New replies are no longer allowed.