Page 1 of 1

[CSS] implementing Min-height in IE

Posted: Mon Feb 27, 2006 9:51 am
by akronim
i've found this useful hack to implement min-height proprety on IExplorer (which does not support it)


.box {
min-height:250px;
height: auto !important;
height: 250px;
}
explorer don't support min-height and !important, and uses hight as min-height
!important is used to overwrite the following  directive (height:200px)


so

explorer will read only height:200px
firefox will read only min-height:250px;  and height: auto !important, will overwrite height:200px


link to the article (in italian)
http://constile.org/tips/min-height/#CONTENUTI

Re: [CSS] implementing Min-height in IE

Posted: Mon Feb 27, 2006 11:28 am
by akronim
Patricia wrote: ok, so if I understand well, if our box is then 300, explorer will also increase, as it uses height as a min-height?

yes in this case

.box {
min-height:250px;
height: auto !important;
height: 250px;
}
both IE, firefox will expand the height of your box to 250px even if the content is 150 px height