William Duffy

Glasgow Based C# ASP.NET Web Developer

Min-Height in Internet Explorer

Do you ever need to specify a min-height for an element on your site? You’ll know if you do that Internet Explorer does not play fair with it. Here is a nice, clean solution that you can use to get full browser support.

1
2
3
4
5
.minHeight100 {
        min-height: 100px;
        height: auto !important;
        height: 100px;
}

I normally condense it into one line when using it in production.

1
2
3
4
.minHeight80 {min-height: 80px; height: auto !important; height: 80px;}
.minHeight120 {min-height: 120px; height: auto !important; height: 120px;}
.minHeight130 {min-height: 130px; height: auto !important; height: 130px;}
.minHeight240 {min-height: 240px; height: auto !important; height: 240px;}

Tagged as , , , + Categorized as HTML & CSS

2 Comments

  1. Johnson Mpeirwe says:

    I have been looking at your site http://www.wduffy.co.uk. You have beautiful and impressive designs, I am impressed.

    Regards,
    Johnson

  2. Brent Jenkinson says:

    I have been looking for an elegant ‘workaround’ for this, and your solution works well. Thank you for sharing it.

    Cheers,
    Brent

comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?>

Trackbacks & Pingbacks

  1. Johnson Mpeirwe

    I have been looking at your site http://www.wduffy.co.uk. You have beautiful and impressive designs, I am impressed.

    Regards,
    Johnson

  2. comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?>

    Trackbacks & Pingbacks

    1. Brent Jenkinson

      I have been looking for an elegant ‘workaround’ for this, and your solution works well. Thank you for sharing it.

      Cheers,
      Brent

    Leave a Reply