Search code examples
drupaldrupal-7drupal-theming

How to make Drupal's Omega theme responsive for IE8 and below?


I' using the Omega theme (http://drupal.org/project/omega) and it doesn't support responsive designs in IE8 and below that Omega uses.


Solution

  • Figured it out! I installed the respondjs module (http://drupal.org/project/respondjs) and had to make a modification to the template.php. Check out http://drupal.org/node/1388898. It looks like the IE specific CSS file(s) are preventing the respond.js file to not work. I removed the IE specific stylesheets and changed ['browsers']['IE'] from gte IE 9 to TRUE. This seems to work for me. I added the following code to my omega subthemes template.php file.

    <?php
    function omega_subtheme_css_alter(&$css) {
        foreach ($css as $key => $value) {
            if (preg_match('/^ie::(\S*)/', $key)) {
                unset($css[$key]); 
            } else {
                $css[$key]['browsers']['IE'] = TRUE;
            }
        } 
    } 
    ?>