/    Sign up×
Community /Pin to ProfileBookmark

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%;
}
[/CODE]

Cheers,
R

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJun 18.2005 — You've probably done this: [I]body {margin:0;}[/I]
Copy linkTweet thisAlerts:
@richiebmanauthorJun 18.2005 — Excellent Fang, thanks. I have made some slight alterations now:

[CODE]
body {
margin:0px 0px 20px 0px;
}

#container {
margin:57px 25px 0px 25px;
}
[/CODE]
×

Success!

Help @richiebman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...