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 to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    relative div wont stay at top

    hi im having trouble with a container div. When i put the container around my other divs they all move down by 15px and right by 10px. I know relative divs are supposed to move but i dont want a gap at the top between the div and the browser.

    all margins / padding / border etc set to zero

    please help

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I know relative divs are supposed to move but i dont want a gap at the top between the div and the browser.

    all margins / padding / border etc set to zero

    please help
    Seems like the collapsible margin 'bug'. Seehttp://complexspiral.com/publications/uncollapsing-margins/ (adding overflow:auto; to the container would be an easy fix!)
    Last edited by abduraooft; 07-01-2010 at 01:05 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Tags for this Thread

    Posting Permissions

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