Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    float:left + margin left

    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;


    }

  • #2
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    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.

    Need IE 6 bug fix - right menu DIV drops

    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
    Last edited by FWDrew; 05-12-2008 at 06:34 AM. Reason: spelling

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You are suffering from the IE double margin bug.
    Code:
    #leftcontent {
    margin-left:5px;
    margin-right:5px;
    float:left;
    width: 557px;
    height:358px;
    background-color:#333333;
    display:inline;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •