Import

IE6 and IE7 limit CSS links to 30

Saturday, August 15th, 2009 | Business | 1 Comment

Help!  Working in Drupal and having trouble getting stylesheets to work?  Did they break all of a sudden in Internet Explorer only?

I can’t see my stylesheets anymore in IE6 or IE7!

Internet Explorer limits the number of stylesheets included with a LINK tag

That’s right.  If you include an additional CSS file beyond 30, it will break other CSS files.

This problem is only in IE6 and IE7.  Officially I’m sure Microsoft says the fix is to upgrade to IE8.

What code causes the problem? Perfectly valid code below:

[sourcecode language=’html’] [/sourcecode]

Just repeat that 31 times, and you will see an error.

The Solution

While <link> tags may have issues beyond 30 stylesheets being included, you can cheat with using @import.

For example, include CSS using the following instead:

[sourcecode language=’html’]

[/sourcecode]

If you’re working in Drupal, there’s a module that implements this fix for you, IE Unlimited CSS Loader.

Tags: , , , , , , , , ,


Please share, it makes me happy:

Subscribe to Email Alerts

Follow Me

Follow seangw on twitter

Archives

Categories

prestashop theme

virtuemart template