IE9 standard view no load CSS

前端 未结 6 1804
不思量自难忘°
不思量自难忘° 2020-12-07 02:19

I have this problem and maybe I\'m not the only..

If I test my website on FF, Chrome, Safari, IE7, IE8 is perfect.

On IE9 (standard view) It doesn\'t load CS

相关标签:
6条回答
  • 2020-12-07 02:36

    I was also facing the same problem, then I moved my css file to static server(or any other domain) and used the new url.

    It worked for me, see if this can solve the problem for you too.

    0 讨论(0)
  • 2020-12-07 02:37

    Likely a typing error in the way you include the stylesheet. Is the URL correct, and is the tag closed properly?

    0 讨论(0)
  • 2020-12-07 02:39

    I'm assuming your local web server is running IIS. If so, just map the .css file extension to the "text/css" MIME type. Like this...

    In IIS v7.x:

    1. Click "MIME Types". You should see a list of file extensions and the associated MIME type.
    2. There should be an entry for the ".css" extension with MIME type = "text/css".
    3. If not, add it by right-clicking anywhere on the list -> Add... -> type in the ".css" extension and "text/css" MIME type.

    In IIS v6:

    1. Right-click the server node -> Properties -> "MIME Types...". You should see a list of file extensions and associated MIME the type.
    2. There should be an entry for the ".css" extension with MIME type = "text/css".
    3. If not, add it by clicking "New..." -> type in the ".css" extension and the "text/css" MIME type.
    0 讨论(0)
  • 2020-12-07 02:46

    IE9 is known to reject stylesheets which are not sent using "text/css" MIME type. This is a new security enhancement, but it's catching a few people off guard. Is your CSS file dynamically generated? Make sure its getting passed as 'text/css'.

    More info: http://blogs.msdn.com/b/ieinternals/archive/2011/03/27/http-406-not-acceptable-php-ie9-standards-mode-accepts-only-text_2f00_css-for-stylesheets.aspx


    Another try:: It's not just 'text/css' in the doc that needs to be correct, you need to make sure your local IIS is sending it with the proper headers. "If a style sheet is ignored due to an incorrect MIME-type, your site may fail to render as expected. Text, images, or other features may lack the desired styling. If a style sheet is ignored because it does not bear the correct MIME-type, a notification will be logged in the IE9 F12 Developer Tools console."

    http://msdn.microsoft.com/en-us/library/gg622939%28VS.85%29.aspx

    IE9 Not applying linked style sheets

    0 讨论(0)
  • 2020-12-07 02:50

    We got this kind of problem with a web project, and the trick was to force IE9 to emulate the website/application as it was IE8. To avoid to use IE9's compatibilty mode,put into the code this tag

    after the tag like this :

    < head>
        < meta http-equiv="X-UA-Compatible" content="IE=8">
        ...
    < /head>
    

    be sure to put it as the first tag after <head>, if not it doesn't work

    0 讨论(0)
  • 2020-12-07 02:57

    I fixed this issue by setting the encoding at the top of my stylesheet

    @charset "UTF-8";

    0 讨论(0)
提交回复
热议问题