On IE there is a limit of 31 css files per page and the individual files have size limits. Do a Google search for

internet explorer limit on css files

for lots more information.

Drupal encourages using many small modules, many of which have a css file. It is not hard to exceed 31. The solution of turning on aggregation then makes the combined css file too big in my case.

Discovering this problem is painful as it moves around as you enable or disable modules, and even which page are looking at when you are near the limit.

The sympton is that it works in FireFox or anything but IE, but fails in IE by laying out the DIVs one below the other.

I could live with a solution where the aggregation process noticed the file size limit and split it into several cached files.

I did not find any useful information about this problem in the Drupal documentation doing what I thought were reasonable searches. I am willing to try to fix the documentation but there is no obvious place to put it.


drumm’s picture

Title: Bug in css caching/aggregation » Notify about, or avoid, IE 31 stylesheet limit
Version: 5.7 » 7.x-dev
Component: other » theme system
Priority: Critical » Normal

Simplest solution would be putting a notice on the site status administration page when this limit is exceeded. Or logging via watchdog when this happens since different pages might have different stylesheets.

yktdan’s picture

I agree that the site status page would be a good place. Admins see that often enough that they will know what their problem is. I don't know enough about the internal structure of Drupal to generate a patch.

brahms’s picture

I had the same problems in my Drupal 5.7 site. Searching on drupal.org I found another Drupal Issue http://drupal.org/node/228818 about this bug.

I am not shure but I think and hope I found a work-around and provided a patch in comment#26of this issue. You can read more in the following comments of the issue 228818 or try a demo site with my work around as I describe in comment#32. I will try to port my patch to Drupal 6.2 in the next few days. (In Drupal 6.2 code the <style> tags had been replaced by <link> tags, but this obviously also did'nt solve the problem).

vietnamtour4u.com’s picture

thanks for inrmation.

Damien Tournoud’s picture

Status: Active » Closed (duplicate)
ginc’s picture