It’s one if the most common problems with the old internet explorer that it handles the box model in a wrong way and I have been cursing for hours due to that problem. To be able to do some workarounds, Microsoft offers browser switching for their browser (IE only) for loading different stylesheets:
<!–[if IE 6]>
<link rel=”stylesheet” href=”/css/only_ie6.css” type=”text/css” />
<![endif]–>
The common syntax for switching works that way:
IE -> Any version of IE
lt IE version -> Versions less than version
lte IE version->Versions less than or equal to version
IE version -> Only version version
gte IE version -> Versions greater than or equal to version
gt IE version -> Versions greater than versionversion is the version of Internet Explorer, typically 5, 5.5, 6, or 7
But there’s a lesser known way of fixing IE problems which is excluding stylesheets for different IE versions. Let’s have a look at an example:
<!–[if !lt IE 7]><![IGNORE[–><![IGNORE[]]>
<link rel=”stylesheet” href=”/css/not_ie6.css” type=”text/css” />
<!–<![endif]–>