tags:

views:

73

answers:

2

I help manage a website for a local ACM student chapter, http://acm.cs.uakron.edu/.

For some reason, Internet Explorer simply refuses to parse the majority of the CSS. Every other browser I know of handles it just fine, but why does IE7+ stop?

+8  A: 

The comments say you have 35 CSS files. That in itself, in addition to just being a lot of requests, is enough to be a showstopper for IE.

According to Microsoft Knowledge Base Article 262161,

All style tags after the first 31 style tags are not applied.

This applies to all versions of IE so far, including the IE9 beta. Ouch. Time to merge those stylesheets into one file.

When handling big complex CSS projects like that, I usually recommend using a CSS pre-processor like Sass, and turning those smaller stylesheets into includes pulled into the larger stylesheet that is fed to the browser. Almost everyone has a different solution to this particular issue, though.

Matchu
It's amazing how IE can impose such arbitrary limits in the most unsuspecting of places.
casablanca
To be honest, if you have to make 35 different HTTP requests just for one page's CSS you _are_ doing it wrong.
badp
@badp: Yeah, it's not a great thing for a website to be doing, but it's also odd for a browser to simply refuse to handle something and not even error out.
Matchu
+4  A: 

Internet Explorer can not parse any more than 31 CSS files wether embedded or not. Even if you use the @import css syntax IE will ignore everything after 31 files! How crap is that?

try http://sourceforge.net/projects/cssmerge/

Gary Willoughby