Reply to Re: nested div height problem

Your name:

Reply:


Posted by Ben C on 12/29/07 23:53

On 2007-12-29, Bazley <jmp6789@hotmail.com> wrote:
> Aha! I see. Thank you Bone chap. But now I have a new problem. In fact
> there are two things not working: (see new code at bottom)
>
> 1) The surround div (green) responds correctly to the two expanding
> column divs contained within (yellow and cyan). But the main div
> (black) does not respond to the expanding surround div. Instead it
> just stays put at its min-height setting of 450px. Why does the main
> div not expand too to keep up with the surround div?
>
> 2) None of the height: 100%; settings are working. I would have
> thought the two column divs should always expand to be the same height
> as the surround div, and the surround div should always expand to be
> the same height as the main div. Why is it not doing this?

It's because all it's got in it are floats. Floats don't cause their
container to expand in height. This is correct behaviour.

Make the container overflow: hidden. That might not work in IE, but on
certain days of the week IE incorrectly calculates heights the way you
wanted them originally anyway.

Otherwise, put a <div style="clear:both"></div> in after the floats.

[Back to original 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

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