Scale down or enlarge to a certain size, for standard browsers (such as Firefox), or the latest IE7 browser,
Just use max-width, max-height; or min-width, min-height CSS properties. For example:
img{max-width:100px;max-height:100px;}
img{min-width:100px;min-height:100px;}
For browsers of IE6 and below, you can use the expression attribute it supports to embed javascript code in css code.
To achieve image scaling.thumbImage
{max-width: 100px;max-height: 100px;} /* for Firefox & IE7 */
* html .thumbImage { /* for IE6 */
width: expression(this.width > 100 && this.width > this.height ? 100 : auto);
height: expression(this.height > 100 ? 100 : auto);
}