If you want to be even more annoyed, look at what happens if you remove the
last two DIVs and end the content with the floated DIV.

The bottom border of the content DIV now excludes the floated DIV, as if it
wasn't even inside of the content DIV.

According to the reading I've done, Firefox is actually acting appropriately
in this treatment of floated objects, because they have been pulled out of
the "relative" "inline" flow of the page. The same thing happens when you
set a DIV to float without declaring a width; the width of the DIV will
collapse to just fit its content.

I can't offer any specific workarounds for this situation. It's one of
those, "yep, that's annoying" kind of issues that we all face. I tend to
avoid floating DIVs at all cost, choosing to position them (absolutely or
relatively) when necessary. But how you eventually solve this problem
depends on what you are trying to accomplish.

-Troy


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> discuss.org] On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, November 17, 2005 12:53 PM
> To: css-d@lists.css-discuss.org
> Subject: [css-d] float and vertical positioning

>  Why does floating a div lead to the collapsing of the
>  margin below? (I see it in firefox, but don't know
>  if it would appear in other browsers.)



______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to