The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 4 of 4

Thread: [CSS] Gap at top of absolute div in Firefox & Opera - not IE!

  1. #1

    [CSS] Gap at top of absolute div in Firefox & Opera - not IE!

    Hello folks, this is my first post - nice board!

    I've got a problem that is really doing my head in. My web site - which you can see on my testing server here: http://shaftesbury.myftp.org/ywd/ - has a niggling problem with the main content.

    You probably won't notice it, so I shall explain. Where it says "Welcome" followed by a little house icon, if you look closely (in FF or Opera) you will see there is a rather large (about 40 to 50px i'd say) gap from the top of the text to the top of the grey container. This should not be there. If you look using IE - the gap is only 20px, which is correct.

    You can see where it should be in FF & Opera by looking at the top of the right-hand graphic that reads "professional web sites from just 400". The top of this graphic is lined up correctly (20px gap at the top).

    Now, the outer container (<div id="main_container">) has position:relative. The container with the problem (<div id="main_text">) is nested inside, and has position:absolute. Can ANYONE figure out why FF & Opera display the gap whereas IE displays it correctly? It's doing my head in!

    A quick fix would be to put main_text as position:relative or just have no position tag at all. However, this royally f**ks it up in Opera for some unknown reason.

    Can anyone help me please? Thanks in advance!

    YetiMan

  2. #2
    176
    posts
    Registered User
    h1.home {
    width: 250px;
    margin-top:0px;
    }
    PHP Code:
    <zip> echo this; </zip

  3. #3
    Quote Originally Posted by antizip
    h1.home {
    width: 250px;
    margin-top:0px;
    }
    Oh man.... that's so simple! *bangs head against desk*

    That never even ocurred to me... I just assumed a heading would have no margin as default ??

    Oh well.... it works fine now, thanks dude, you have reduced my blood pressure for sure

    YetiMan

  4. #4
    176
    posts
    Registered User
    no prob, those stupid margins give me headache-a-plenty. glad i could help. good day to you sir
    PHP Code:
    <zip> echo this; </zip

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012