Register now or login here to start promoting your blog and your favourite articles.
10 Awful IE Bugs and Fixes
14 Sep 2009 - 23 Comments
I have listed 10 common Internet Explorer bugs and solutions. I believe this will able to help you shorten the times spent on debugging the layout inconsistensies in IE.
Author: kevin | Source: queness

Introduction

Everyone has a story to tell when dealing with Internet Explorer. As a developer I have faced numerous bizzare problems with IE and sometimes you just want to bang your head against the wall! However, as time goes by, we slowly learn from mistakes (well, sometimes it's not our fault, it's IE!!!) and start to adapt and understand IE's weird behaviors. We have to because there is still a considerable number of IE6 users. The best practise is to continuously test your website from the start across different browsers. It's easier to fix the layout problems from the start rather than testing and fixing it in the end after thousands of lines of html and css code.

There are a lot of campaigns out there to protest against IE6. People who support it are mostly web specialists and normal users just don't seem to care. So, what we can do now? We have to continue to digging around to fix IE6 issues. But, wait for it, there is a Good and Exciting News. Based on the monthly stat from w3cschool, IE6 users have been steadily decline over a few years. Since 2006 Jan 60.3% until now 2009 Aug 13.6%. At this rate, we should able to get rid of IE6 around end of next year 2010. YES!!!

Right, Back to reality, I have listed all the problems that I have encountered before into a list for future reference. I believe this will help you shorten the times spent on debugging the layout inconsistensies in Internet explore.

1. IE6 Ghost Text Bug

Just before I wrote this article, I encountered this bug. It's so bizzare and hilarious. A piece of duplicated text came from nowhere and IE6 display it somewhere in the bottom near to the original text. I couldn't solve it, so I search for it, and BINGO, it's just another IE6 Bug.

There are quite a lot of solutions for it, but none of them work to me (I can't use some of the methods because of the complexity of the website.), so I used a really hacky method. Adding spaces next to the original text seems to solve the problem.

However, from a website called Hippy Tech Blog I found online. The reason behind it is due to the html comment tag. IE6 can't render it properly. The following is a list of solutions he suggested:

Solution
  • using <!—[IF !IE]> tags around the comment.
  • remove the comment
  • in the preceding float add a style {display:inline;}
  • Use –ve margins on appropriate floating divs.
  • adding extra &nbsp; (like 10 spaces) to the orginal text (the hacky way)

2. Position Relative and Overflow Hidden

I faced this problem a lot of times when preparing a jQuery tutorial, because I used overflow hidden a lot to make the desired layout.

It happens when the parent element overflow set to hidden and the child element is set to position:relative.

CSS-Trick has a good example to demonstrate this bug. position:relative and overflow in internet explorer

Solution
  • Add position relative to the parent element.

3. Min-Height for IE

It's simple, IE ignores min-height properties and you can use the following hack to fix it. Credit to Dustin Diaz

This solution works like a charm in IE6, Mozilla/Firefox/Gecko, Opera 7.x+, Safari1.2

Solution
selector {
  min-height:500px;
  height:auto !important;
  height:500px;
}

4. Bicubic Image Scaling

You'll love this one. Does the bad image scaling in IE bothering you? If you compared other browsers and IE, IE's rescaled image doesn't look as good as other.

IE versus firefox

Solution
img { -ms-interpolation-mode: bicubic; }

5. PNG Transparency

I guess everyone knows this, but I'm going to put it here anyway just for future reference :)

So if you want to use transparent image and GIF doesn't give you the quality you want, you will need this hack for PNG. You have to be aware, if you use a PNG as background, you will not able to set the background position.

Solution
img {
	filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...);
}

6. IFrame Transparent Background

In firefox and safari you shouldn't encounter this problem because by default, the iframe background is set to transparent, but in IE, it doesn't. You need to use allowTransparency attribute and put the following CSS code to achieve that.

Solution
/* in the iframe element */
<iframe src="content.html" allowTransparency="true">
</iframe>


/* in the iframe docuement, in this case content.html */
body {
	background-color:transparent;	
}

7. Disabled IE default Vertical Scroll bar

By default, IE displays vertical scrollbar even though the content fit nicely in the window. You can use overflow:auto to show it only when you need it.

Solution
html {
	overflow: auto;
}

8. :hover Pseudo Class

IE only supports :hover pseudo class for anchor element. You can achieve the same effect using jQuery hover event.

Solution
/* jQuery Script */
$('#list li').hover(

	function () {
		$(this).addClass('color');
	},
	
	function() {
		$(this).removeClass('color');
	}
);


/* CSS Style */
.color {
	background-color:#f00;	
}

/* HTML */
<ul id="list">
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ul>

9. Box Hack Model

This is the hottest bug in IE. The basic understanding is that IE calculates width differently. Based on w3c standard, total width of an element should be

  • total width = margin-left + border-left + padding-left + width + padding-right + border-right + margin-right

However, Internet Explorer calculates it without adding paddings and borders:

  • total width = margin-left + width + margin-right
For more details, please check out this link: Internet Explorer and the CSS box model Detailed Explanation Solution
  • Use the w3c use standards compliant mode. IE6 or later will calculate the width based on w3c standard, however, you will still having problem for IE5

Or, you can use CSS Hack to solve this problem. All standard compliant browsers will able to read w\\dth:180px except IE5.

#content {
	padding:10px;
	border:1px solid;
	width:200px;
	w\\idth:180px;
}

10. Double Margin Bug Fix

If you have floated elements with margin left and/or right assigned, IE6 will double up the margin. Forexample, margin-left:5px will become 10px. You can solve that by adding display:inline to the floated element.

Solution
div#content {
	float:left;
	width:200px;
	margin-left:10px;

	/* fix the double margin error */
	display:inline;
}

Final words

I hope this article will help you all. Please bookmark it, share it and spread it to the rest of the web designers and developers! :)

Copyright & Usage

The effects and techniques demonstrated in tutorials on Queness can be used in whatever manner you wish without attribution. You cannot copy whole tutorials (unless permission is given), either in English or translated to another language.

Share This Post to Support Me! :)


Comments

Han Spen on 15 Sep 2009 says:
Excellent compilation. But the word "awful" is not spelled "aweful".
kevin on 15 Sep 2009 says:
oops, thanks for the spelling correction! :p
Amber Weinberg on 15 Sep 2009 says:
Won't we all rejoice when IE6 is finally dead?
Nykeri on 17 Sep 2009 says:
wow i didnt know about the fitler property for png transparency i always used hacks for ie thanks man
Tyler Herman on 18 Sep 2009 says:
Nice compilation. Have run into most of those but some seem pretty bizarre (ghost text).

Also:

http://ie6update.com/
Michael Wilson on 21 Sep 2009 says:
Ah the beauty of IE bug fixing.

Always makes me smile when I see web designers praying for IE6 to die. I would think that is still a long way off yet so just make sure your code is clean and that your clients are educated about progressive enhancement
elshafei on 22 Sep 2009 says:
Thank you very much

http://designsandtechnology.blogspot.com/
Eric on 23 Sep 2009 says:
that IMG fix for scaling just made my day!!!!. btw the tab order in your form is incorrect. i should be able to tab from the comment box to the captcha box.
amit on 23 Sep 2009 says:
asdfasdf
JustASurfer on 23 Sep 2009 says:
I stopped supporting IE6 this year and told people "Upgrade, or get lost."

Yes, literally. Why? Because trying to fix these issues is too time consuming, not guaranteed (browser settings vary), and pointless when a (somewhat) better version is out there.

Coders, instead of covering these issues, take a stand and tell these people to upgrade.

Otherwise, you're just enabling these people to keep their browser.

Don't wait until the end of 2010. Make it happen by the end of *this* year.
Ryan Coughlin on 24 Sep 2009 says:
Great tips and fixes for stubborn IE. Those are extremely common and a great reference.

Quick and easy fixes.
Check Spelling on 27 Sep 2009 says:
I dont care much about IE 6 or 7 anymore. According to my analytics its only few % and it get only smaller. But I must say this list is very impressing.
ghprod on 2 Oct 2009 says:
Wow , u have tell all bugs in IE :D

great! nice information!

Thnx and regards
Aria Ariamanesh on 6 Oct 2009 says:
Very helpful ;)
Tai Travis on 13 Oct 2009 says:
You hit on some IE bugs I have not encountered but destined to lose sleep over in the future. Thanks.
I am always a little wary if putting hacks directly into my main CSS stylesheet. For conditional stylesheet for IE7 and earlier I think hacks are expected.
It is our responsibility as web designers to educate the public about IE6. One way is to use IE6 no more. http://www.ie6nomore.com/
Online Betting Casino on 21 Nov 2009 says:

Betting casino online via the Internet is different in many ways from betting to a game table in a <a href=\"http://bestbettingcasino.blogspot.com\" rel=\"follow\">Best Betting Casino</a>. Most games offered in a real casino can be played online at any time of day or night. Two things you are wanting to crowd around a hot table, and drinks available. There is no constant background noise of the bells
of slot machines or the excited cries of a winner at the craps table.
Kartlos Tchavelachvili on 22 Dec 2009 says:
Thanks for this killer tips! especially #7 and #6

denbagus on 28 Dec 2009 says:
nice information about find bug & fixes
ecommerce website on 20 Jan 2010 says:
Thanks for the information..
Please enter here more common IE bugs...
Vipul Mathur on 21 Jan 2010 says:
Very helpful article.
freaknboy on 26 Jan 2010 says:
Great great great, my favorite IE bug fix tips,
go on ! thks
kaddechi on 27 Jan 2010 says:
good website
Web seo specialist on 3 Feb 2010 says:
Thanks for the sharing of such information. we will pass it on to our readers. This is a great reading. Thanking you. <a href="http://www.seochampion.com">Web seo specialist</a>

Leave a comment

http://
Subscribe RSS Subscribe RSS, Keep yourself updated with queness latest posts!
Pixel Crayons Buy and Sell Flash Buy and Sell Flash

Buy wholesale computers directly from China at DHgate.com

Discover the tools to build your e-Commerce Site with Netfirms

  •  
  •  
  •  
  •  
  •  

Community News

Recent Comments

Random Posts


View all posts and news Back to top

About the Author

A web designer and developer who is passionate and keen on contributing to the web development industry. Feel free to say hi to me, or follow me on twitter.

Kevin Liew

Partner

  • Web and Designers
  • CSS Style
  • PV.M Garage Blogzine - (Italian)
  • TutsValley
  • Designrfix
  • CoolVibe
  • Web Developer Juice
  • Denbagus
  • Web Hosting Secret Revealed
  • PSD to HTML Conversion
  • BlueHost