Login

Contact

You can leave a message using the contact form below.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Error loading CSS in IE

Hide all descriptions
Error description: 

Ceased to connect to the theme CSS files when viewing through Internet Explorer

The error occurs because of restrictions on the number of IE plug CSS files (problems arise when trying to connect over 30 css files).

The solution lies in the function:

<?php
function phptemplate_preprocess_page(&$vars) {
 
/**
   * Slove 30 CSS files limit in Internet Explorer
   */
 
$preprocess_css = variable_get('preprocess_css', 0);
  if (!
$preprocess_css) {
   
$styles = '';
    foreach (
$vars['css'] as $media => $types) {
     
$import = '';
     
$counter = 0;
      foreach (
$types as $files) {
        foreach (
$files as $css => $preprocess) {
         
$import .= '@import "'. base_path() . $css .'";'."\n";
         
$counter++;
          if (
$counter == 15) {
           
$styles .= "\n".'<style type="text/css" media="'. $media .'">'."\n". $import .'</style>';
           
$import = '';
           
$counter = 0;
          }
        }
      }
      if (
$import) {
       
$styles .= "\n".'<style type="text/css" media="'. $media .'">'."\n". $import .'</style>';
      }
    }
    if (
$styles) {
     
$vars['styles'] = $styles;
    }
  }
}
?>

This function must be added to the file template.php, which you can find in the folder you are using the theme.