|
Posted by Andy Dingley on 11/28/07 14:05
On 28 Nov, 10:12, Mark <u...@example.net> wrote:
> This seems to work OK, but is it a reliable method?
You can either force a minimum height on the container, or you can add
an element with "clear" after the floated elements. Depends whether
you want to always force a minimum height (which might be a big empty
space), or just to force a minium height that's reliably bigger than
the float (to stop the floated elements hanging out of it).
> Or should I put the
> height on one of the floated divs, not the container?
No, because setting thhe height of a floated box definitely _won't_
set the height of its container. Read http://brainjar.com/css/positioning/
Navigation:
[Reply to this message]
|