...

View Full Version : float:left + margin left



coffeeping
05-12-2008, 04:32 AM
hi, i hv set a margin left for my css layout but why after add the float:left, in IE 6 the margin will extra 2 more pixels?anyone know the solutions?




my coding as below
#leftcontent {
margin-left:5px;
margin-right:5px;
float:left;
width: 557px;
height:358px;
background-color:#333333;


}

FWDrew
05-12-2008, 06:33 AM
Hi,

I cant be of too much help,as I dont have IE 6, but I happened to have read a thread earlier I believe will help you.

http://codingforums.com/showthread.php?t=139462

Towards the bottom, you will see candygirl speak of a specific IE6 bug that adds 3 px to a floated contents element, followed by a list of links and hacks :)

Regards,

Drew

_Aerospace_Eng_
05-12-2008, 07:04 AM
You are suffering from the IE double margin bug.

#leftcontent {
margin-left:5px;
margin-right:5px;
float:left;
width: 557px;
height:358px;
background-color:#333333;
display:inline;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum