[thelist] Problem with floats and spacers

Mark Howells webdev at mountain.ch
Thu Aug 22 01:53:01 CDT 2002


> I'm using some floated divs nested in a container div, with spacers above
> and below the floated divs.
> The problem is that the spacer div is taking up space, and messing my
> design.

Aren't spacer divs supposed to take up space -- I thought that was the
point?

That aside, what function do the spacer divs fill? Are they, perhaps, to
make the colour of the background div stretch all the way to the bottom of
the floated divs? If so, then the following code...

<div id="container">
    <div id="float1"></div>
    <div id="float1"></div>
    <br clear="all" />
</div>

...may be a better solution.

Regards
Mark Howells
<http://www.mark.ac/evl/>




More information about the thelist mailing list