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 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    48
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Padding size problem with IE

    Hello,

    I have a CSS block (see below) which adds a bottom and right border to a div. The code works fine with Firefox and Opera. However on IE the bottom border seems to be not 5 but ~10 pixels far from the left side. (controlled by margin-left:5px) If I change the 5px to eg. 4px IE makes the difference 2 px big instead of 1.

    Any idea?

    Code:
    #side-left {
       float:left;
       margin-left:5px;
       padding-left:0px;
       border-right:1px solid #ddd;
       border-bottom:1px solid #ddd;
       width:160px;
    }

  • #2
    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
    Code:
    #side-left {
       float:left;
       margin-left:5px;
       padding-left:0px;
       border-right:1px solid #ddd;
       border-bottom:1px solid #ddd;
       width:160px;
       display:inline;
    }
    http://www.positioniseverything.net/...ed-margin.html
    ||||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
    •