10

I have css file:

<head>
  <link rel="stylesheet" type="text/css" href="/assets/application.css" media="screen" />
  ...
</head>

With all browsers everything is fine(chrome,ff,ie8,ie10,...), except IE9.

IE9 does not load css fully.

ole
  • 5,166
  • 5
  • 29
  • 57
  • Have you tried breaking these up into individual lines to see if one particular "type" is causing the error? – DevlshOne Dec 01 '13 at 13:06
  • 1
    See http://stackoverflow.com/questions/3656237/why-inputtype-text-is-not-working-in-ie – SquareCat Dec 01 '13 at 13:06
  • 1
    I think this can help you http://stackoverflow.com/questions/8226863/ie9-standard-view-no-load-css 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'. – San Dec 01 '13 at 13:09
  • 1
    @San. Server respond header `Content-Type:text/css` with file `application.css` – ole Dec 01 '13 at 13:26
  • @DevlshOne. IE is not repoting about any css errors. When I'm trying individualy load this part, all is fine. – ole Dec 01 '13 at 13:28

4 Answers4

14

Bit late but for future visitors of this thread: I had the same problem and found out my project just had gotten too big. IE9 stops reading your stylesheet after 4095 selectors.

For reference: Does IE9 have a file size limit for CSS?

Community
  • 1
  • 1
Fake Haak
  • 226
  • 1
  • 3
  • 7
0

IE has always had trouble with special CSS selectors. You are trying to use attribute based selectors input[type="email"].

Try to include this in your -> https://code.google.com/p/html5shim/

Otherwise try to give classes to all input objects you want to style and remove the selectors you have now.

Severin
  • 8,508
  • 14
  • 68
  • 117
  • No luck. Problem that I'm using external libs like `semanti-ui` or `foundation` and I can't strip all "bad" selectors. – ole Dec 01 '13 at 13:19
  • Have you checked that those frameworks are compatible with IE? – Severin Dec 01 '13 at 13:21
  • Yep, compatibled with IE9. – ole Dec 01 '13 at 13:22
  • Hmm. You have probably tried inspecting the elements that don't get the right styling? Could it be that you use some vendor-prefixed selectors that are active in "normal" browsers but get ignored by IE? – Severin Dec 01 '13 at 13:29
0

First I am not sure IE9 had support for all the new HTML5 input types as they were not to a stable standard when it was released like 4+ years ago. So you should try to add some sort of selector you can style for the obsolete versions you need to support. The ones that have a stable specification will work fine in IE today.

Also make sure the CSS files are loading by firing up the F12 tools and inspecting the network tab or use Fiddler if you want to do the same thing. If you see a 4XX status code for any of your resources investigate accordingly.

Chris Love
  • 3,740
  • 1
  • 19
  • 16
0

There are many reasons for this error. For me I just changed the extension CSS to lower case and that works fine.

Yassin
  • 1,376
  • 18
  • 18