DISQUS

Design Pitstop: CSS Hack: Cross-Browser “min-height” Hack

  • Ray Ellis · 1 year ago
    Thank you, George, for the clean solution. It works nicely in both IE and Firefox for my application. I like the way it is easy to implement in both the CSS and the HTML code.

    -ray
  • jbj · 1 year ago
    Hi, and thx for the article.
    Btw, you should try this:

    .myClass{
    min-height:100px;
    height:auto !important;
    height: 100px;
    }

    Explanation: For browsers who understand min-height, let them use it. IE6 don't understand anything with the !important directive, so the second line will be only for better browsers.
    And finally, for IE6 the height property works as min-height. So this will be applied by IE6, but not any other browsers, due to the !important directive.
  • Venkateswara Rao · 1 year ago
    Thank you for great hack.

    Hi jbj, your solutions works better