Set max-width in Internet Explorer
IE9, at least, does support max-width
percentages for images, but the percentage is relative to the image's size, not the container's size. (You can see this by changing 100%
to, say, 70%
.) It will work somewhat as expected, however, if you specify inherit
instead of 100%
. Doing so will inherit the container's size for max-width
in IE9. (I've only tested your example page in IE9, Firefox, and Google Chrome, and it's not true that for that page, the images will keep scaling down as the window width gets smaller.) This is not a perfect solution however; in IE8 browser mode, applying inherit
this way will make the table cell's width equal to the image's unscaled width, even though the image is correctly scaled down.