Skip to content

Instantly share code, notes, and snippets.

@zachleat
Created May 19, 2011 14:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zachleat/980895 to your computer and use it in GitHub Desktop.
Save zachleat/980895 to your computer and use it in GitHub Desktop.
HTML5 Boilerplate Issue #378 (No Compatibility View button, tested in IE7/IE8/IE9)
<!--[if IE ]><![endif]-->
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>IE Compact Test</title>
<style>
.ie6 p,
.ie7 p,
.ie8 p {color:green;}
</style>
</head>
<body>
<p>hello</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment