- Joined
- 13 Feb 2002
- Messages
- 854
I thought I'd share something.
IE's CSS support is truly deplorable. It's quite sad that, for a browser that once looked better than the rest, it is now an embarrassment. I can create a site that looks perfect in Firefox, but looks awful in IE.
Thankfully, IE has a non-standard extension read by IE 5+ and ignored in others, meaning you can create special commands solely for IE. If you want two different stylesheets, you can do this:
The former command is interpreted as a "comment" in Mozilla, so it is ignored. The latter will be read by IE to skip the line, while the top and bottom tag are ignored by non-IE browsers.
But it also works for making changes in a web page. In IE, it would not put enough space between two objects, while it looked perfectly in Firefox. So, to add additional space in IE only, I added this:
Anyway, I know how difficult it is creating sites that work with multiple browsers, and this extension will likely ruin any W3C validators. But, if all else fails, there's always this extension.
You can read up more on it here:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/ccomment_ovw.asp
Melon
IE's CSS support is truly deplorable. It's quite sad that, for a browser that once looked better than the rest, it is now an embarrassment. I can create a site that looks perfect in Firefox, but looks awful in IE.
Thankfully, IE has a non-standard extension read by IE 5+ and ignored in others, meaning you can create special commands solely for IE. If you want two different stylesheets, you can do this:
Code:
<!--[if gte IE 5]>
<link rel="stylesheet" type="text/css" href="default-IE.css" />
<![endif]-->
<![if !IE]>
<link href="default.css" rel="stylesheet" type="text/css" />
<![endif]>
The former command is interpreted as a "comment" in Mozilla, so it is ignored. The latter will be read by IE to skip the line, while the top and bottom tag are ignored by non-IE browsers.
But it also works for making changes in a web page. In IE, it would not put enough space between two objects, while it looked perfectly in Firefox. So, to add additional space in IE only, I added this:
Code:
<!--[if gte IE 5]>
<br><br>
<![endif]-->
Anyway, I know how difficult it is creating sites that work with multiple browsers, and this extension will likely ruin any W3C validators. But, if all else fails, there's always this extension.
You can read up more on it here:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/ccomment_ovw.asp
Melon