conditional stylesheet iE


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function MYTHEME_preprocess_html(&$variables) {
  2.  
  3. // Add conditional stylesheets for IE
  4. drupal_add_css(path_to_theme() . '/css/ie-8.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE, 'weight' => 115));
  5. drupal_add_css(path_to_theme() . '/css/ie-7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE, 'weight' => 115));
  6.  
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.