min-height hack/workaround in IE6,IE7 & Firefox
June 13, 2008
Hey i was wondering how to use min-height for all the 3 browsers and came across a workaround and which works wonders in all the 3 browsers.
selector {
min-height: 103px;
_height: auto !important;
height: 103px;
border:1px solid red;
}
In case it helps please leave a comment.
Entry Filed under: css. Tags: css, hacks, hacks for IE6, min-height.
12 Comments Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed



1.
joe | July 18, 2008 at 2:42 am
works for me! thanks a bunch!
2.
jamie | September 5, 2008 at 4:06 am
does _height work?
3.
Furious Photographers | September 11, 2008 at 10:04 pm
I’m curious myself never heard of that command but am willing to try! I can’t wait for Chrome to rule them all so that we don’t have to use so many hacks
4.
Andy | September 14, 2008 at 7:57 pm
Works great thank you!!
5.
Jonah H | November 26, 2008 at 7:04 am
Thanks, this worked for me on a recent project.
6.
epos | January 21, 2009 at 4:53 pm
Works a treat. Thanks. I have just spent about an hour trying to sort this out before reading your post.
Again, thank you.
7.
Lucas | January 23, 2009 at 12:37 pm
Hola.
Mejor omitir “height: 103px;” porque en FF elimina el min-height.
Con solo tenemos suficientamente
min-height:159px; (para FF3, Opera, googlechrome)
_height:auto !important; (para IE6 y IE7)
Saludos
Lucas
8.
Michele | January 23, 2009 at 1:32 pm
Great help, thank you!
9.
wazime | February 23, 2009 at 1:17 am
Thanks for this hack, it will come in handy as I redesign my blog.
10.
Harvey | March 26, 2009 at 1:47 pm
Perfect, thank you.
11.
Coder Jones | July 17, 2009 at 4:01 pm
You’re just hard-coding the height. That breaks in Firefox if you want the element to be able to expand.
12.
vadivel | October 8, 2009 at 9:38 am
i need css hack for all browser ie 6,7,8 &firefox,google chrome