开发者

Why does Internet Explorer simply stop parsing in the middle of my CSS?

开发者 https://www.devze.com 2023-01-20 04:31 出处:网络
I help manage a website for a local ACM student chapter, http://a开发者_如何学编程cm.cs.uakron.edu/.

I help manage a website for a local ACM student chapter, http://a开发者_如何学编程cm.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?


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.


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消