Phantom margins

Discussion in 'Web Design and Development' started by memco, Dec 4, 2008.

  1. memco macrumors 6502

    Joined:
    May 1, 2008
    #1
    Ok, so I'm getting a weird -12px right margin on the nav menu (sub menus) here. There are no negative margins set anywhere so this is strange. Any ideas?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Not seeing the negative margin on sub-nav. Using FF3.

    There is a typo in your print.css file though (unrelated to your problem).
    Code:
    #wraper {
    
    	margin [B][COLOR="Red"];[/COLOR][/B] .5in;
    
    }
     
  3. MegaMan1311 macrumors regular

    Joined:
    Jun 30, 2007
    Location:
    USA
    #3
    I'm not seeing anything weird Everything looks good to me...
    Running Safari 4 Developer Preview, Opera 9.5, and Firefox 3. (I'm thorough with browser testing. ;) )
     
  4. memco thread starter macrumors 6502

    Joined:
    May 1, 2008
    #4
    I figured it out. I had the width of the <a> set to 11em, and had padding inside, this caused a break. By shrinking the width down to accomodate the padding, the <a> fit inside the 11em <li>s and everything works ok.

    Thanks Angelwatt, fixed.
     
  5. MegaMan1311 macrumors regular

    Joined:
    Jun 30, 2007
    Location:
    USA
    #5
    Just curious, but what browser was the issue in?
     
  6. memco thread starter macrumors 6502

    Joined:
    May 1, 2008
    #6
    Before I fixed it, it was occurring in IE6, Safari/Webkit nightly and FF3. The math wasn't right so the a tag inside the li was bigger than the li or ul. This led to some wonky behavior, which I fixed by ensuring the numbers played nicely together.
     

Share This Page