Hello, how can i set minimal height for div? But it have to resize with new data.
A:
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.
meder
2009-09-17 18:45:56
Or you could use conditional comments instead of a css hack.
voyager
2009-09-17 18:48:01
That's what I meant by "ie6.css" ...
meder
2009-09-17 18:57:25
Note that my second example was catered to IE6 only, it didn't contain star html. I just threw that in there for completion.
meder
2009-09-17 18:58:19
A:
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).
Dominic Rodger
2009-09-17 18:46:36
+1
A:
min-height
works fine... except in IE.
The way to fix it and therefore use it everywhere is importing ie7.js
marcgg
2009-09-17 18:58:05
Yeah, and when JS is disabled? Plus the extra overhead... even if it solves other things I don't think it's worth it. But props to Dean E. for the idea.
meder
2009-09-17 18:59:55
This is still better than having it breaking all the time. People with JS disabled are used to see broken websites anyways :)
marcgg
2009-09-17 19:20:39