External CSS won’t load in IE7
I just spent a while wondering why IE7 wouldn’t make use of an external stylesheet when it worked in Firefox no problems.
The page is in UTF-8 and the .css file was also encoded in UTF-8 but IE7 simply refused to render the page using the CSS rules.
I have no idea what the problem is but if you are having similar issues try putting @charset “UTF-8″; at the top of your external stylesheet – it worked for me.
Does anyone know what the underlying issue is?
Posted by Daniel Skinner 2008-04-05 02:04:29
Categories: Web Development




I had similar issues for a while, my solution was to include the W3C header at the top of my pages.
I think strict is preferred but I needed loose for some weird css or something.
Comment by pkenjora — May 6, 2008 @ 2:45 pm
Yes, it’s strange. Actually, I ended up taking @charset “UTF-8″; out in the end as it invalidated the CSS file.
Yeah, strict doctypes can have an effect on the CSS, for example, the box model. However, I have always found less issues when coding to strict.
Comment by Daniel Skinner — May 6, 2008 @ 2:58 pm