Previous Message
Next Message

Unrelated divs seem to be interlinked on the bottom border.

Sent by Alan Chandler on 17 September 2005 08:08


On Saturday 17 Sep 2005 03:48, Gunlaug Sørtun wrote:
> Alan Chandler wrote:

> > The only possible linkage that I can see is through the clearfix
> > class, but I don't understand why.  Can someone give me an
> > explanation so that I can have a clue as how to avoid it.
>
> You're correct: it's clearfix interfering -- because 'clear: both;' will
> also clear the menu.
>
> One way to "isolate" the problem:
>
> Add the following styles, with underscores and all, at the bottom of
> your stylesheet:


Thank you, it works 

However, I am still stuggling to understand

a) Why exactly clear:both is having the effect it has, and
b) Why the new stuff isolates it.

My thinking so far on this

the .clearfix:after selector as applied to the first spouse div is creating a 
hidden box (of zero height) which must not have content to the left (or right 
for that matter) of it.  As such it is pulling that first div's content to 
just below the #menuapps div.

The existing #pagebody's left margin of 205px has been collapsed down to only 
5px via the new stuff, so something else must be preventing the overlap that 
previously would have occurred with the #menuapps div.  That must be the 
overflow property, but I don't actually understand why.

Can you please explain.
-- 
Alan Chandler
http://www.chandlerfamily.org.uk
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
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/
Previous Message
Next Message

Message thread: