Create a Website
CSS Tutorial
FREE Hosting!
With every domain name
you register at DotEasy
you get FREE (no-ad)
one year hosting.
PLUS you get:
  • FREE Website Builder
  • FREE Blog
  • FREE Forum
  • FREE Photo Album
  • FREE Email Accounts
Get your FREE hosting today!
Home > CSS Tutorial
$0 Web Hosting

If you want to get pixel-perfect results cross-browser, you may need to specify alternate stylesheets for different browsers, especially Internet Explorer. Internet Explorer doesn’t play by the same rules as most browsers.

Here is the basic technique for an IE-only stylesheet:

The Code

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-only.css"/>

You can also create IE-only stylesheets for specific versions of IE, for example,

The Code

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="ie-7-only.css"/>

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie-6-only.css"/>

Enjoy this tutorial?

1. Link to this page(copy/paste into your own website or blog):
2. Add this page to your favorite social bookmarks sites:
3. Add this page as your favorites. (Press Ctrl+D)