HTML IE 7 & IE 8 specific css hack

This is a great way to avoid both multiple browser-specific stylesheets and JavaScript to detect and account for IE 7 & 8 browsers.
<!--[if IE 7]><html class="ie7"><![endif]-->
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html><!--<![endif]-->
Snippet Viewed 1532 times.

Share your HTML code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.

 

Submit | Browse

Most Recent html snippets

Most Viewed