Previous Message
Next Message

Easy Clearing and clear:both issue

Sent by jack fredricks on 22 March 2006 02:02

Thank you both (Gunlaug and Ingo),

the problem was indeed my lack of understanding of the 'Block
Formatting Context', listed as G said here;

The key then is to change the Block Formatting Context..and..WOW...

G's suggestion of changing the margin-right to overflow:hidden does that

not only seems more a "solid" way to do my 2 col layout.
Damnit..more reading to do..I had no idea that overflow would do that.
I just thought it meant "if my internal content gets too big, hide it
or show scroll bars etc". However, in this case, it is ALSO effecting
the box model of the element.

Without overflow:hidden set, the left-hand-edge of the div.main is
touches the left-hand-edge of the containing element (in this case the
body or div.wrap, im not sure which one).

With overflow:hidden set, the left-hand-edge of the div.main
effectively moves in c200px (ie the width of the floated div.leftnav).

Big difference..

again, thanks both. Everytime I post a question here, I learn about 4 things.

css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: