Thank God Internet Explorer 5 support conditinal comment So we can kick out the css browser problem in Internet Explorer. If you are confusing about how to hack the internet explorer 5 then I suggest you to hack in safe way that’s CSS Conditional Comment. So that we can track bug  in a simply way no need take headache problem. The most beneficial aspect of conditional comments is that you are not relying on browser bugs when using them. When you use CSS hacks that rely on browser bugs, you run into the possibility of those bugs being fixed at an unwanted time or other browsers showing the same bugs.

Note :
Since versions of IE older than IE 5 don’t support conditional comments, you may get unexpected results in those browsers.

CSS Conditional Comment goes like this:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”&gt;
<html lang=”en”>
<head>
<title>CSS Conditional Comment</title>
<link href=”all_browsers.css” rel=”stylesheet” type=”text/css”>
<!–[if IE]> <link href=”ie_only.css” rel=”stylesheet” type=”text/css”> <![endif]–>
<!–[if lt IE 7]> <link href=”ie_6_and_below.css” rel=”stylesheet” type=”text/css”> <![endif]–>
<!–[if !lt IE 7]><![IGNORE[–><![IGNORE[]]> <link href=”recent.css” rel=”stylesheet” type=”text/css”> <!–<![endif]–>
<!–[if !IE]>–> <link href=”not_ie.css” rel=”stylesheet” type=”text/css”> <!–<![endif]–>
</head>
<body>
<h2>Testing CSS Conditional Comment</h2>
</body>
</html>

Advertisements