-- Drupal and Web Development

Notice: this post was last updated 5 years 1 week ago so it might be outdated. Please be cautious before implementing any of suggestions herein.

Using conditional stylesheets (IE) with Omega

As described here, conditional_styles does not work with Omega for Drupal. Here's what to add in your template.php file for this to work:

function YOUR_THEME_NAME_preprocess_html(&$variables) {
// Add conditional stylesheets for IE
drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.