Tag Archives: IE6

Cross-browser min-height

No IE, please
No IE, please

The min-height declaration is poorly understood by Internet Explorer. However, here’s a trick to force minimum height on a block element that works in all browsers:

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

This would set a min-height of 200px on all browsers. All browsers except IE6 will respect the !important flag and ignore the second height property, while IE6 will still use the second height property, then expand as needed.