I\'m trying to display some large images with HTML img tags. At the moment they go off the edge of the screen; how can I scale them to stay within the browser window?
<
IE6 Internet Explorer 6
Percent only works for the width of an element, but height:100%; does not work without the correct code.
CSS
html, body { height:100%; }
Then using a percentage works properly, and dynamically updates on window resize.
You do not need a width attribute, the width scales proportionately as the browser window size is changed.
And this little gem, is in case the image is scaled up, it will not look (overly) blocky (it interpolates).
img { -ms-interpolation-mode: bicubic; }
Props go to this source: Ultimate IE6 Cheatsheet: How To Fix 25+ Internet Explorer 6 Bugs