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 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2006
    Location
    Graz, Austria
    Posts
    81
    Thanks
    2
    Thanked 1 Time in 1 Post

    ie global margin issue

    hi there!

    I am designing a page with a div, which extends from the very left of the page to the very right.

    here is the relevant code:
    Code:
    #top {
    margin-left:-10px;
    margin-top:130px;
    width:110%;
    height:100px;
    }
    For Firefox it was sufficient to apply a margin-left of -10px and to increase the width, but IE simply ignores these parameters! The <div> has a margin of approx. 12px left AND right. I tried to increase the negative margin and to set the body margins, but nothing worked. The only possibility was the absolutely positioning of the <div>, which destroys the rest of the page.

    Is there a global margin-value for IE? If yes, is it possible to override it?
    webmaster and member of
    http://cashfromchaos.net

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    Set the padding and margins of your body, html and div to 0 and then see what happens from there.

    Code:
    html, body, #top {
      padding: 0;
      margin: 0;
    }

  • #3
    New Coder
    Join Date
    Jun 2006
    Location
    Graz, Austria
    Posts
    81
    Thanks
    2
    Thanked 1 Time in 1 Post
    yes, that does the job! very simple, I should have known for myself!

    thank you!
    webmaster and member of
    http://cashfromchaos.net


  •  

    Posting Permissions

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