469,311 Members | 2,413 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,311 developers. It's quick & easy.

IE6 IGNORING margin-bottom (and acting on top.left,right!)

I was struggling with some elaborate nested divs,
and my styles were working fine on everything (even Mac/ie5.2)
*except* IE6.0 on Windows 2000 professional.

I have 2 nested DIVS, both float-lefted.
The inner one has a small border and a large margin.

On viewing, the upper, left and right margins
of the inner div are honoured, but the bottom
is COMPLETELY IGNORED!

Since the HTML (and styles) is tiny, here it is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Funny margin behaviour</title>
<style type="text/css" media="screen">
body {
}
div.outer {
float:left;
background: blue;
border: 1px solid green;
}
div.inner {
float:left;
background: yellow;
margin: 50px;
border: 1px solid red;
}
</style>
</head>

<body>
<div class="outer">
<div class="inner">
hello world
</div>
</div>
</body>
</html>

I have carefully checked
http://www.quirksmode.org/
and
http://www.hut.fi/u/hsivonen/doctype.html
and read
http://www.w3.org/TR/REC-CSS2/cover.html#minitoc
VERY careful, and I think my HTML is Valid.

Is this a known bug, or have I made
some horrendous oversight?

If it *is* a bug, I would welcome (understatement)
any workrounds...

BugBear
Jul 21 '05 #1
0 3206

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by mitsura | last post: by
8 posts views Thread by A.M | last post: by
11 posts views Thread by Bruce A. Julseth | last post: by
3 posts views Thread by Ed Chiu | last post: by
6 posts views Thread by James Brown [MVP] | last post: by
TheServant
14 posts views Thread by TheServant | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.