[CSS] implementing Min-height in IE

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
akronim

[CSS] implementing Min-height in IE

Post 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
Last edited by akronim on Mon Feb 27, 2006 11:25 am, edited 1 time in total.
akronim

Re: [CSS] implementing Min-height in IE

Post 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
Locked

Return to “Layout and Design (CSS & HTML)”