Yeah that's true, a float won't expand its container, I've got assloads of <div class="clearboth"> </div> to get around this.
On Thu, 10 Feb 2005 18:07:51 -0800, Andreas Boehmer <[EMAIL PROTECTED]> wrote: > > John Horner wrote: > > > * floated elements too big for the enclosing element "spill out" > > > * except on IE, where they stretch the enclosing element > > > > > > that's a bit simplified, but essentially correct, right? > > > > > My question is, *why* is the correct behaviour the first one? It > > > takes a lot of people by surprise and they often see what IE does as > > > the natural and obvious thing to do. > > > > - div A has dimensions and they should be respected, > > But even if you don't give Div A a set height it won't expand. > > > - no matter the size of the content: div B, > > - except in IE/win, where we need workarounds. > > > > A standard-compliant browser will let us choose if we want the container > > to expand, or not. No height, or min-height only, on div A, and it will > > behave as in IE/win across browserland. > > Sorry, I can't test my statement here, so if I am wrong please correct > me, but as far as I remember taking out the set height (or min-height) > of Div B will reduce Div A to 0 height. Floating Div B has got a similar > effect to giving position:absolute - Div A will ignore the existance of > Div B. > > > ****************************************************** > The discussion list for http://webstandardsgroup.org/ > > See http://webstandardsgroup.org/mail/guidelines.cfm > for some hints on posting to the list & getting help > ****************************************************** > > -- So come and join us all you kids for lots of fun and laughter While Roger Ramjet and his men get all the crooks they're after [ Josh 'G-Funk' McDonald ] -- [ Pirion Systems, Brisbane] [ 07 3257 0490 ] -- [ 0437 221 380 ] -- [ http://www.gfunk007.com/ ] ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************