Skip to content

Instantly share code, notes, and snippets.

@thetallweeks
Last active January 2, 2016 17:49
Show Gist options
  • Save thetallweeks/8339250 to your computer and use it in GitHub Desktop.
Save thetallweeks/8339250 to your computer and use it in GitHub Desktop.
This provides ie classes on the html tag in case of ie-specific styling. Note: Modernizr replaces "no-js" with "js" when it loads. If you are not using Modernizr, don't include "no-js"
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html dir="ltr" lang="en-US"class="no-js iem7"> <![endif]-->
<!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6 lt-ie7 lt-ie8 lt-ie9 lt-ie10"> <![endif]-->
<!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7 lt-ie8 lt-ie9 lt-ie10"> <![endif]-->
<!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8 lt-ie9 lt-ie10"> <![endif]-->
<!--[if IE 9 ]> <html dir="ltr" lang="en-US" class="no-js ie9 lt-ie10"> <![endif]-->
<!--[if IE 10 ]> <html dir="ltr" lang="en-US" class="no-js ie10"> <![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html dir="ltr" lang="en-US" class="no-js"><!--<![endif]-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment