IE Ingnores "margin-bottom" sometimes
I noticed today that when I tried to add a bottom margin to my container DIV using CSS the margin was ignored in IE6 and IE7 but not FireFox.
I was trying to add a little space at the bottom of the container, so the when you scrolled all the way to the bottom my footer was not right against the bottom of the browser window.
So I did this:
#container {
margin: 0px 0px 12px 0px;
}
I added 12 pixels of margin to the bottom of the DIV, but IE just ignored that. I of course could just add a couple of these
. One interesting/annoying thing is that I changed the bottom margin to something like 99px, just to make it obvious that IE was ignoring the margin. And it was. Then I went and added a couple of
just below the container DIV. Well, once I did that IE finally recognized the margin. Even if I just added on
, IE would add all the bottom margin and I had a margin of 99px.
So would ignore the margin if there was no content, but even a
was told it there was content and it then recognised the bottom margin.
??????