max-width for images in IE
To use max-width the syntax is:
selector {max-width:value;}
Internet Explorer up to version 6 doesn’t support the max-width property but has the ability to perform javascript like functions on it’s CSS so you can fake max-width with it. Here’s the syntax:
selector {width: expression(this.width > value ? value: true);}
example for IMG html tag:
img {
max-width:390px;
/* IE Image max-width */
width: expression(this.width > 390 ? 390: true);
}
NOTE: max-width property does NOTHING for the file size if used with an image.









Finally an example that works, Cheers.
thanks, works perfectly.
great!
thanks, I’ve been searching for a straight forward method and this works perfectly.
Yay! Thanks.