You are here: Re: Clearfix problem « HTML « IT news, forums, messages
Re: Clearfix problem

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация