Internet Explorer will ignore “min-height” attribute.

Here is a quick CSS fix to get the min-height property to work in Internet Explorer :

solution 1

/* for all browsers */

.div { width:600px; border:1px solid #000; min-height:400px; height:auto; }

/* for Internet Explorer */

/*\*/ *

html .div { height: 400px; }


solution 2

So, to set a minimum height, first use the actual property:

min-height: 300px

then use the underscore hack to set the height property:

_height: 300px

.div { min-height:400px; _height:400px; }

All browsers but IE will ignore the hacked property, and since IE effectively treats height as min-height, you’ll get the effect that you want in all browsers.