2 replies [Last post]
mol
Offline
Regular
out of this world
Last seen: 13 years 2 days ago
out of this world
Joined: 2007-08-23
Posts: 20
Points: 0

Hi all,
I need ur help, I got problem when I use margin-left for my left column in my page.
I preview in FF and IE7 everything is OK (the position is what I expected) , when I preview it in IE6 the 2 column (left column and right column) quiet far to the right.Here is the code :

.left{
float:left;
margin-top:8px;
width:355px;
margin-left:8px;
margin-right:12px;

}

IE6 interpret "margin-left:8px" quiet differently than FF/IE7 do.
Can anyone help me to solve this ?

Here is the link :
http://molusca.com/csstes/index.html

many thanks

AttachmentSize
FF.jpg48.37 KB
IE6.jpg50.36 KB
gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 18 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

doubled float margin bug

That's the doubled float margin bug. The fix is simple, but totally nonintuitive: add {display: inline;} to the floated element.

A float may only be {display: block || none}, and all browsers ignore the inline, but it fixes the margin. :shrug: It's IE.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mol
Offline
Regular
out of this world
Last seen: 13 years 2 days ago
out of this world
Joined: 2007-08-23
Posts: 20
Points: 0

Hi kk5st, Thx for the

Hi kk5st,

Thx for the solution , it works