Jump to Navigation

Drupal 6 can use to many stylesheets for IE6

Drupal 6 can use to many stylesheets for IE6

Many of the Drupal sites I develop are based on the excellent Zen theme which comes ready made with a special CSS file to fix many of Internet Explorer's well known bugs. However, one such bug affecting IE4 to IE6, can't be fixed with special css rules: all style tags after the first 30 style tags on an HTML page are not applied in Internet Explorer. When your Drupal site uses a lot of extra modules, the number of stylesheets can quickly build up to over this limit.

Luckily, there is a fix built into the Drupal core itself. In the Performance page (Administer >> Site Configuration >> Performance) there is an option entitled Optimize CSS files. This will combine all your stylesheets in to one file and as a result it will fix the bug and all your stylesheets will now load. It will also result in a significantly faster Drupal. On the downside, it is a pain in the ass to develop with this setting enabled since changes to your stylesheets will not take effect unless you manually flush Drupal's cache. Enabling the devel module can make this a very quick process.

Please share your thoughts, comments and suggestions...

If you have your own website, enter its address here and we will link to it for you. (please include http://).
eg. http://www.kirkdesigns.co.uk