The Definitive FAQ on Screen Resolution

Indeed it doesn’t. IE6 doesn’t support ‘max-width’.

It is possible to implement with expressions, but it only seems to work when the parent element has “layout”. The following expression will check if the parent element has layout, and, if so, set a maximum width to 100%. (Without the check all images whose parent doesn’t have layout will become 100% wide; with it they stay unaffected.)

img { max-width:100%; -width:expression(((w = typeof(w) == "undefined" ? new Array() : w)&&(w[this.src] = typeof(w[this.src]) == "undefined" ? this.clientWidth : w[this.src]))&&(this.parentNode.clientWidth <= w[this.src] && this.parentNode.currentStyle.hasLayout ? "100%" : "auto")); }

The “w” variable is so that it doesn’t forget the initial size. The [this.src] thing is so that it works for different images.

The dash in “-width” is a hack to target IE6 so that it doesn’t affect newer versions of IE that support ‘max-width’ natively.

You can’t have height=“” attributes in the markup though.

Edit:

It doesn’t seem to perform very well though; when applied here on SitePoint IE6 hangs. If you experience such problems you should probably make the selector more specific so that it only applies to the images you want to scale, and then it should work well.

HTH,