Skip to content

Instantly share code, notes, and snippets.

@kmgdevelopment
Created September 10, 2012 20:09
Show Gist options
  • Save kmgdevelopment/3693504 to your computer and use it in GitHub Desktop.
Save kmgdevelopment/3693504 to your computer and use it in GitHub Desktop.
Why Does the IE Hack Work But Conditional Class Doesn't?
<!doctype html>
<!--[if IE 8]> <html class="oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<style>
li {
display: inline-block;
/* Why does this work */
*display: inline;
*zoom: 1;
}
/* But this does not? */
.oldie li {
display: inline;
zoom: 1;
}
</style>
</head>
<body>
<ul>
<li>Hello</li>
<li>World</li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment