Skip to content

Instantly share code, notes, and snippets.

@chipcullen
Created January 3, 2013 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chipcullen/4444388 to your computer and use it in GitHub Desktop.
Save chipcullen/4444388 to your computer and use it in GitHub Desktop.
Opening HTML for Drupal themes. Based on HTML5 boilderplate conditional comments around the <html> tag that identifies IE7 and IE8. Useful for CSS targeting. Goes in html.tpl.php.
<?php print $doctype; ?>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="<?php print $language->language; ?>"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8 ie7" lang="<?php print $language->language; ?>"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="<?php print $language->language; ?>"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>"<?php print $rdf->version . $rdf->namespaces; ?> > <!--<![endif]-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment