The Myriad Blog

Our Online Journal

09
Jan
2009

CSS Tricks: IE6 "min-height" Hack

| Posted by Peter Schultheiss on January 9th, 2009 at 11:53 am

It's very useful to be able to specify a minimum height for an HTML container. Unfortunately, IE6 does not properly support the min-height attribute. This frustrated me for a long time, but there's a solution! The following example is simple, valid and just plain works.

Say you want to enforce a minimum height of 200px on a container, simply add the following code to your identity or class:

min-height: 200px;
height: auto !important;
height: 200px;

That's all there is to it. I didn't come up with this on my own, so a special thanks goes to Dustin Diaz for publishing this hack.


Recent Projects
Our Services
Follow Us