|
Posted by Ben C on 04/02/07 16:25
On 2007-04-02, luigi7up <luigi7up@gmail.com> wrote:
> I'm working on two coulumns layout. Left div contains menu and basket
> while right contains main content...
>
><body>
><div id="wrap">
><div id=left>
><ul id=menu>
></ul>
></div>
><div id=right>
></div>
></div>
><body>
> In right div (content) I have div with image floated to left. Image
> float doesn't work well, of course, so I add class clearfix to that
> div with floated element. It should be streching vertically just
> enough to hold floated image and text within that div but it stretches
> too much. I noticed that it spreads vertically to dimensions of
> content of left div where my menu is. So, if I add things to my left
> column my floated div is spreading more and more...
> Funny thing is that if I have two divs in right column second div has
> no problems.
>
> Do you have any idea what seems to be the problem?
It's hard to know for sure without seeing your actual example. Post a
url.
You see, it depends among other things on how you're doing the left and
right divs. It may be that clear is clearing some other floats over on
the left that you don't expect it to clear. clear clears all floats in
its block formatting context, not just in its containing block.
[Back to original message]
|