Author: Henrik Hedegaard
Henrik Hedegaard is a professional information architect as well as UI and UX specialist with the Danish design bureau Designit A/S.
Henrik is also the co-founder of Reworks I/S, a small Danish web design bureau.
Constantly IE6 and/or IE7 behave as pain the the a** when you develop web-applications or websites.
But you can target your CSS and/or JavaScript for these browsers using just a few lines of simple code:
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="screen" href="ie6.css" />
<![endif]-->
In this case we only check if the user's browser version is less than IE/, eg. IE6 or IE5 or IE5.5.
Here are a couple of variants:
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" media="screen" href="ie6.css" />
<![endif]-->
It targets ONLY IE version 6.
<!--[if IE 5]>
<link rel="stylesheet" type="text/css" media="screen" href="ie5.css" />
<![endif]-->
This only targets IE version 5.
So the "lt" in the top example stands for "less than" (NOT "less than or equal).
For a video tutorial of this, please refer to
detatcheddesign.com.