CSS Max Height Property

Sadly IE6 doesn’t so you have to use an expression for IE6, then set the max-height for all other browsers:

 div{
       _height: expression( this.scrollHeight > 332 ? "333px" : "auto" ); /* sets max-height for IE6 */
       max-height: 333px; /* sets max-height value for all standards-compliant browsers */
       overflow:scroll;
}

Overflow:auto would most likely work in most cases for have any extra spill over.

Leave a Comment