In How to ,Web Design | Tags: double margin, ie6, tutorial | | June 29, 2009
I hear a lot of talk on Twitter and the bloggosphere about rendering issues in IE6 * and in my experience the most common one is the double margin problem.
Let’s say, for example, you have a container div with a width of 900 pixels:
#container {
width: 900px;
}
Then you have two inner divs which go side by side, like so:
#lnav {
width: 126px;
padding-right: 12px;
padding-left: 12px;
float: left;
}
#maincontent {
width: 670px;
padding-right: 45px;
margin-left: 35px;
float: left;
}
This will display fine in most browsers but for IE 6 you need to add ‘display:inline‘ :
#maincontent {
width: 670px;
padding-right: 45px;
margin-left: 35px;
float: left;
display: inline:
}
Simple! I don’t know why or how this works, but it does. If you have more nested divs, try adding the ‘display: inline’ to these as well and keep checking in IE6 until it looks right.
Once you have your general layout displaying correctly, your battle with IE6, in my opinion, is mostly over. When it comes to dropdown menus and AJAX * scripts, these are more difficult to get right across all browsers, especially if you are using browser shots to see how your page is rendering and not actually testing in all browsers.
As a general rule, it is safe to assume that your scripts will not work in all browsers, so as well as using scripts that degrade well in older browsers, it is good practise to provide an alternative text-only version.

2 ResponsesLeave a comment
I have a little problem referring to IE 6. My site uses two columns layout. The left side contains the navigation, and the right side covers the content. I put some text links on the sidebar beside the navigation and it looks good in Firefox, Safari, Chrome, Opera, IE 7 and IE 8. The problem appeared when I tested in IE 6. The very last link of the left sidebar got duplicated. Is there a simple way to fix it?
Thanks again.
Thanks for your
Hi Ibaniaz,
I am replying to your comment AGES after you left it and you’ve probably found your answer by now. But just in case you haven’t or if anyone else arrives on this page with same problem, here is a fix I found on positioneverything.net
http://www.positioniseverything.net/explorer/dup-characters.html
Good luck.