Question
how can i set minimal height for div? But it have to resize with new data.
Solution
You want the CSS property min-height
. You'll need to be careful of not great browser support (particularly older versions of IE, shockingly enough).
OTHER TIPS
min-height
works fine... except in IE.
The way to fix it and therefore use it everywhere is importing ie7.js
div#name
{
height: 60px;
height: auto !important;
min-height: 60px;
}
This should work across browsers including IE
div#foo {
min-height:10em;
}
in ie6.css or prepend with * html selector ( hack warning )
div#foo { height:10em; }
Since MSIE6 doesn't support min-height.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow