2 Minute question - HTML / CSS If div within div expands expand parent div?

Instead of setting the "height", set the "min-height.

Instead of setting the "height", set the "min-height".

1 Watch out for browser compatibility on min and max. – Evan Plaice Jun 17 '10 at 6:27 Changed it to min height and the it still won't expand when the content goes past the window border. – Thqr Jun 17 '10 at 6:27 min height works in Firefox. But not chrome or IE.

– Thqr Jun 17 '10 at 6:35 which IE version? I have it implemented in IE 7 and IE 8 and it should work. – Syd Jun 17 '10 at 6:37 IE8.

It will not resize the div at all. It sits at starting size. – Thqr Jun 17 '10 at 6:38.

Short solution is give height auto to both divs.

Related Questions