www.webdeveloper.com
Results 1 to 3 of 3

Thread: Why does IE ignores bottom margin on outer container?

  1. #1
    Join Date
    Mar 2004
    Location
    Sheffield, UK
    Posts
    176

    Why does IE ignores bottom margin on outer container?

    I have come across this problem many times, when I would like some extra space between the bottom of the browser window and the end of my website content. If I add say 20px to the bottom margin of my outer container, sensible browsers comply and add 20px. IE does nothing.

    In the past I have added another DIV, added 20px of height to it and everything is good. But I'd rather not do that this time, so does anyone know why IE does this and is there a solution without adding more markup.

    In this instance my container DIV has the following:

    Code:
    #container {
    	margin:57px 25px 20px 25px;
    	background:#FCFCFC;
    	text-align:left;
    	font-size:100%;
    	}
    Cheers,
    R

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    You've probably done this: body {margin:0;}

  3. #3
    Join Date
    Mar 2004
    Location
    Sheffield, UK
    Posts
    176
    Excellent Fang, thanks. I have made some slight alterations now:

    Code:
    body {
            margin:0px 0px 20px 0px;
            }
    
    #container {
    	margin:57px 25px 0px 25px;
    	}

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
  •  
HTML5 Development Center



Recent Articles