Drupal website specialists. Call us about your project on (02) 8006 3402

Enabling min-height in your css for Internet Explorer

Posted 19/July/2008 by neubreed

Your code is like this:

<div id="box"></div>

and you want to put a minimum height on the div called 'box'. Put the following code into your CSS:

#box { 
   /* sets max-height for IE */
   height: expression( this.scrollHeight > 332 ? "333px" : "auto" ); 
   /* sets max-height value for all standards-compliant browsers */
   max-height: 333px;