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: , , , .

14 Comments Add your own

  • 1. joe  |  July 18, 2008 at 2:42 am

    works for me! thanks a bunch!

    Reply
  • 2. jamie  |  September 5, 2008 at 4:06 am

    does _height work?

    Reply
  • 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

    Reply
  • 4. Andy  |  September 14, 2008 at 7:57 pm

    Works great thank you!!

    Reply
  • 5. Jonah H  |  November 26, 2008 at 7:04 am

    Thanks, this worked for me on a recent project.

    Reply
  • 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.

    Reply
  • 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

    Reply
  • 8. Michele  |  January 23, 2009 at 1:32 pm

    Great help, thank you!

    Reply
  • 9. wazime  |  February 23, 2009 at 1:17 am

    Thanks for this hack, it will come in handy as I redesign my blog.

    Reply
  • 10. Harvey  |  March 26, 2009 at 1:47 pm

    Perfect, thank you.

    Reply
  • 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.

    Reply
  • 12. vadivel  |  October 8, 2009 at 9:38 am

    i need css hack for all browser ie 6,7,8 &firefox,google chrome

    Reply
  • 13. Ali A. Akbar  |  November 17, 2009 at 11:19 am

    Screws up firefox. Doesn’t allow it to go over because of the height declaration.

    Reply
  • 14. izdelava spletnih strani  |  November 22, 2009 at 8:51 am

    I’m developing web sites and didn’t notiec that png isnt supported in ie, i’ll check but thanx for this tip

    Reply

Leave a Comment

Required

Required, hidden

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


Spam Blocked

Flickr Photos

eight.

The edge of a Dutch kingdom

I'm still standing................. yeah yeah yeah

More Photos

Blogroll

Recent Posts

Recent Comments

izdelava spletnih st… on min-height hack/workaround in …
kathmandu flights on iframe change src | javas…
Ali A. Akbar on min-height hack/workaround in …
izdelava spletnih st… on WordPress Themes
izdelava spletnih st… on Top 25 medical colleges

Pages

Top Clicks

Top Posts

Blog Stats