No Javascript required.
IE6 Internet Explorer 6
Percentage works only for the width of the element, but height:100%; not working without the correct code.
CSS
html, body { height:100%; }
Then, percent usage works correctly and is dynamically updated when the window is resized.
<img src="image.jpg" style="height:80%;">
You do not need the width attribute, the width is scaled in proportion to the size of the browser window.
And this little pearl, if the image is enlarged, it will not look (too) blocky (it is interpolated).
img { -ms-interpolation-mode: bicubic; }
Details go to this source: Ultimate IE6 Cheatsheet: How to Fix 25+ Internet Explorer 6 Errors
unidentified-1 Mar 07 '13 at 18:25 2013-03-07 18:25
source share