IE9 Not applying linked style sheets
I have a wierd problem. I developed a site that works fine in most browsers. I just upgraded to IE9 and none of my styles are being applied. I'm viewing this on my local pc as this site is not on the internet just yet. All in-line or page level styles get applied correctly but the styles linked from external css files开发者_如何学Go in the HEAD section aren't applied at all. If I use the developer toolbar and view the site as IE8, IE7, or any other mode the sites work fine. There's about 6 style sheets and no extra components so it shouldn't be an issue of too many style sheets. I can't figure what is causing this. Anybody else seen this?
Maybe your server do not send the right mime-type http://msdn.microsoft.com/en-us/library/gg622939%28VS.85%29.aspx
Codler's link, combined with the fact that "I'm viewing this on my local pc as this site is not on the internet just yet," almost certainly gives the answer. When serving files from your local machine, it is usually pretty unlikely that the correct MIME type gets sent.
Generally, to test a website, you need some kind of web server---even if it's just one you set up on your own machine. The file system is really not meant for serving web pages, and behaves in unpredictable ways (e.g. Firefox can't do web fonts on the file system, IIRC).
精彩评论