On 7/19/06, Ryan Keefer <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I'm missing something basic in CSS and it keeps popping up in sites
> I'm working on. I've got a container div (background of #FFF) that
> has smaller divs floating in it. I want that container div to
> automatically adjust its height as more (or less) content is added to
> the divs inside it. Right now, if I omit height or put height: auto,
> it doesn't work. I have to put a fixed pixel heights in to make any
> difference.
>

Sounds like you need to clear the floats. After the last floated
element, but within the container add:

<div style="clear:both; margin:0; padding:0; font-size:0;
line-height:0;"><!--&nbsp;--></div>

Adjust accordingly, or make a class with that style. Also, see:
http://www.positioniseverything.net/easyclearing.html

or search the CSS-D wiki for clearing

HTH

-- 


Tom Livingston | Senior Multimedia Artist | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
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/

Reply via email to