Jeniffer C. Johnson wrote:

>>This happens because your content column is in the same "block
>>formatting context" as the left floated sidebar.  Thus, clears within
>>the content column will also clear the left float.  To stop this, you
>>need to establish a new block formatting context for the content
>>column.  This will make clears within it ignore stuff outside of it,
>>which is exactly what you want.  To establish this new context, you can
>>float the content column as well.
>>    
>>
>
>My understanding is that in order to declare a float on the content column,
>it must also have a width declared, 
>

Nope.  This was required in CSS 2.0, but not in CSS 2.1, and the only 
browser that still requires it is MacIE.  Even it can be worked around, 
however. :-)

>and this column is intended (in the two
>layouts I'm currently seeing this problem crop up in) to be fluid. 
>

Since floats shrinkwrap their content when you leave a width off, you 
need to use width: 100%.  But then you'd get a horizontal scrollbar.  
Unless, that is, you use negative margins.  Negative margins are a 
useful way to build layouts that avoid some of IE's float drop 
tendencies.  There are a couple different approaches:
http://www.pixelsurge.com/experiment/negative_margins_1.html
http://www.pixelsurge.com/experiment/negative_margins_2.html

If this isn't an attractive option to you, there are other ways than 
floating to establish new block formatting contexts.  Just apply one of 
these to the content column and the clears within it will stop clearing 
the left floated sidebar.
http://www.w3.org/TR/CSS21/visuren.html#q15

The content column will also need to "have layout" in IE for your method 
to work.
http://www.satzansatz.de/cssd/onhavinglayout.html

Zoe

-- 
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
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/

Reply via email to