At 17:50 -0800 16.02.2005, [EMAIL-REMOVED] wrote:
>What you are seeing actually doesn't have to do with whether the content
>divs are contained in another div -- it has to do with whether that
>container div has a border around it or not. (If you remove the border, you
>see the same issue as if the container hadn't existed.)
>The difference has to do with collapsing margins. This gets pretty complex
>-- I gave a long-winded explanation a while back, to which Bob Easton
>also recommended an article from Eric Meyer. Hopefully reading these
>will help make sense to the next paragraphs.
>Basically, the border forces the top-margin'ed div to keep that margin
>within the box. Without that, the margin is imposed on the next container's
>margin (in this case, <body>), pushing everything within that container
Obviously, I forgot to consider the fact that a border would do more
than just add a border...
But even had I found your earlier explanation  or (re)read Eric
Meyer's article  I'm afraid I wouldn't have realized that the
problem was there. The fact that with the margins "uncollapsed" the
space above the floated div disappears and with margins "collapsed"
the space appears is as unintuitive to me as you can get. Your
explanation that uncollapsing keeps the margin within the box and
collapsing imposes the margin on the next container was very helpful.
Quarante-Deux : quelques pages sur la Science-Fiction
Ellen C. Herzfeld - Dominique O. Martel
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/