CSS styles don't load in Internet Explorer (checked on version 9 and 7). They work locally, but not on the remote server. Do you have any idea?

Edit: It seems that compressing CSS inside "configuration >> performance" causes this problem. Is there a way to turn this feature for all browsers except IE?

  • Are you saying turning 'Optimize CSS files' on (on the admin/settings/performance page) causes this problem, or turning it off causes this problem? Jun 3, 2011 at 15:16
  • @geerlingguy With turned this feature ON I have this problem.
    – smogg
    Jun 4, 2011 at 9:15

3 Answers 3


Does turning on CSS aggregation make your CSS work in IE?

If so, you may be coming up against the 31 CSS file limit in Internet Explorer.

Someone has made a module that deals with this - IE Unlimited CSS Loader.

  • CSS aggregation cause this problem for sure so I turned it off. The module You provided is not compatible with Drupal 7 :( In link You gave me I read thats not a problem in Drupal 7... But that's not true for me. Any idea?
    – smogg
    Jun 4, 2011 at 9:00

What you need to do is copy the html.tpl.php template from modules/system/html.tpl.php to your themes templates directory, so sites/all/themes/your theme/templates and open it up. In the head section add this tag:

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

This tells Internet Explorer to specifically use the web standards incorporated into IE 8. This means that basically for any version of Internet Explorer equal to 8 and above you'll have, at minimum, IE 8 viewing standards. I had to do this same thing when using CSS aggregation.

BTW, you don't necessarily have to use version 8 as the base, if your site runs fine with 7 then I'd recommend going with 7.


As well as the 32 stylesheet limit there's a 4095 selector per stylesheet limit. If you're encountering that issue with aggregation on then it's probably the selector limit.

I've gotten around this in the past by writing a page preprocess function to split up aggregated stylesheets into smaller chunks than IE can handle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.