Hi
How can I set minimum height for a div in IE. I read - and tested - that IE doesn't support min-height. So What do I do?
if I just set height, the rest of stuff - if any - will be hidden.
Thanks.* html #myelement {
heightvalue goes here);
}Dave Shea posted a more complete cross-browser sol'n a while back:
/* for Mozilla/Safari/Opera */
*>.box {
padding-top: 200px;
min-height: 1px;
}
*>.box p {
margin-top: -200px;
}
/* for IE, with IE5/Mac backslash filter \*/
* html .box {
height: 200px;
}
/* end filter */
<!-- m --><a class="postlink" href="http://www.mezzoblue.com/archives/2004/09/16/minheight_fi/Mike">http://www.mezzoblue.com/archives/2004/ ... ht_fi/Mike</a><!-- m -->,
Don't get me wrong, I'm not disagreeing, but I'm just wondering what the point of all that code is and why what I posted isn't enough... ?Mike,
Don't get me wrong, I'm not disagreeing, but I'm just wondering what the point of all that code is and why what I posted isn't enough... ?
If you read the article I linked, he explains that his solution gives the correct behaviour in Safari, IE5/mac, IE/win, Moz, and Opera.
If you only need to support IE, then yes, the one line is fine.Mike,
Sorry, I didn't notice the link earlier - it was too early in the morning...
Interesting reading...
Thanks for that.It's how to do min-height for IE/Win and versions of Safari that don't support min-height.
It's the alternative to my simpler method that only fixes min-height in IE/Win. (<!-- m --><a class="postlink" href="http://www.dynamicsitesolutions.com/css/min-height_for_msie/">http://www.dynamicsitesolutions.com/css ... _for_msie/</a><!-- m -->)
Thanks for linking to that, Mike. I had forgotten about that article.For the question asked, I would go with BonRouge's method. IE will automatically stretch a fixed height element with an overflow of content. For a more browser compatible method, Mikepurvis has the resources.
How can I set minimum height for a div in IE. I read - and tested - that IE doesn't support min-height. So What do I do?
if I just set height, the rest of stuff - if any - will be hidden.
Thanks.* html #myelement {
heightvalue goes here);
}Dave Shea posted a more complete cross-browser sol'n a while back:
/* for Mozilla/Safari/Opera */
*>.box {
padding-top: 200px;
min-height: 1px;
}
*>.box p {
margin-top: -200px;
}
/* for IE, with IE5/Mac backslash filter \*/
* html .box {
height: 200px;
}
/* end filter */
<!-- m --><a class="postlink" href="http://www.mezzoblue.com/archives/2004/09/16/minheight_fi/Mike">http://www.mezzoblue.com/archives/2004/ ... ht_fi/Mike</a><!-- m -->,
Don't get me wrong, I'm not disagreeing, but I'm just wondering what the point of all that code is and why what I posted isn't enough... ?Mike,
Don't get me wrong, I'm not disagreeing, but I'm just wondering what the point of all that code is and why what I posted isn't enough... ?
If you read the article I linked, he explains that his solution gives the correct behaviour in Safari, IE5/mac, IE/win, Moz, and Opera.
If you only need to support IE, then yes, the one line is fine.Mike,
Sorry, I didn't notice the link earlier - it was too early in the morning...
Interesting reading...
Thanks for that.It's how to do min-height for IE/Win and versions of Safari that don't support min-height.
It's the alternative to my simpler method that only fixes min-height in IE/Win. (<!-- m --><a class="postlink" href="http://www.dynamicsitesolutions.com/css/min-height_for_msie/">http://www.dynamicsitesolutions.com/css ... _for_msie/</a><!-- m -->)
Thanks for linking to that, Mike. I had forgotten about that article.For the question asked, I would go with BonRouge's method. IE will automatically stretch a fixed height element with an overflow of content. For a more browser compatible method, Mikepurvis has the resources.