On 7/7/11 5:39 PM, Venditelli, Daniel - Web Development Administrator wrote:
It's been one of those days...

I've stumbled upon an issue with clearing floats that I feel like I've
done before but for the life of me cannot figure out today. I'm either
too close, too tired, too low on caffeine or getting a bit senile and
misinterpreting the CSS box model and sibling relationships.

In the linked example, I would like "paragraph 2" to clear just the
"floating content" in the white block as it does in IE 7, NOT the
"Green-ish Container" as it is currently doing in both Chrome 12 and
Firefox 4.

  - http://www.ci.yuma.az.us/share/TEST-float-quirks.htm

As you can see, I've stripped this down as much as I can to make sure
none of the hullaballoo* in my working project is causing the issue.

[...]

Appreciated. :)

For this to work, the DIV with 50em width needs to establish it's own
block formatting context. IE 6 & 7 effectively do this with the
explicit width declaration.[1]

You'll get the same result in real browsers by adding an "overflow"
value of any value different from the default "visible." I added this:

overflow: hidden:

Hope this works in your actual page.

[1] http://www.satzansatz.de/cssd/onhavinglayout.html
--
Cordially,
David

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

Reply via email to