Previous Message
Next Message

Floated element and parent height

Sent by Steve Wilson on 7 May 2008 18:06


I could fix this with javascript, but I'd like to do a pure css  
solution if possible.

<div class="outer">
     <div class="inner">text</div>
</div>

The height of div.outer includes the height of div.inner (16px in  
firefox), as expected. However, if I float div.inner:

<div class="outer">
     <div class="inner" style="float: left;">text</div>
</div>

then div.outer has height of 0px. Any way to fix this?
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: