SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Internet Consumist Kayn's Avatar
    Join Date
    Feb 2001
    Location
    Missouri
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Margin percentage

    If I used a value like:

    Code:
    body {
    margin: 0px;
    padding: 0px;
    }
    
    #ad {
    margin-left: 15%;
    padding: 0px;
    width: 50px;
    height: 50px;
    }
    Why is it that in IE the margin-left shows up as 30%? Am I missing something?
    Sing in a band called Psychostick, Alfredo Afro.

  2. #2
    Internet Consumist Kayn's Avatar
    Join Date
    Feb 2001
    Location
    Missouri
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *sigh*

    I kindof found a solution:

    Code:
    * html #ad {margin-left: -15%;}
    
    body {
    margin: 0px;
    padding: 0px;
    }
    
    #ad {
    margin-left: 15%;
    padding: 0px;
    width: 50px;
    height: 50px;
    }
    Works a little better, but the margin-left still isn't even with other browsers. Bleh.
    Sing in a band called Psychostick, Alfredo Afro.

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's called the double margin bug. You can find a solution on the CSS stickies at the top of this forum.


Bookmarks

Posting Permissions

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