Why the extra vertical space?
Sent by Michael Landis on 6 July 2006 19:07
On 7/6/06, Rick Pasotto [EMAIL-REMOVED]> wrote:
> These are nested DLs. (I'm using DLs because there is a possibility of
> additional info for each governor -- phone, quote, picture, etc.)
> As far as I can see the code for the two sections is identical yet the
> first has additional white space above the inner DL. Why?
Because each div within the lists have "clear:both", they are clearing
the left navigation.
The reason this is happening is that clearing impacts everything
within the same block formatting context. So as long as the stuff
inside content area is in the same context as the floated element, the
float will be impacted by any clearing done there.
To keep the clears from interfering with the floats, you will need to
put them into different formatting contexts. The easiest way to do
this is to put the content area inside a float. Then the clears inside
the float only impact the elements within that float, and don't touch
anything outside. You might want to use one of the standard float
layouts to isolate the floats in one column from the floats in
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/