My page is a 3 column design with a header. It renders nicely in IE6 and IE7 (as far as i know). I use javascript to size certain elements of the page, to fit the browser window. On IE8 however, it tries to leave spaces for scrollbars, even when they are not rendered, resulting in a jumping effect when you resize (Page alternates between leaving the gap, and then not.)
If i set overflow:scroll in my css it resolves the issue, however i do not want the scrollbars to show when not needed, so this is only a temporary fix.
Is there any way i can get my page to stretch to maximum width and height (with javascript) and only get scrollbars when needed?
I think you have your thinking reversed now that I've thought about it more.
IE7 and below always showed the scrollbar (disabling it if its not needed). So, when scrolling is needed, the UI doesn't need to be altered to enable/disable scroll.
Since IE8 this is no longer true. When scrolling is needed, the page jumps to accomidate the new needed space for the scrollbar. The same is true for any browser that doesn't show the scrollbar by default.
If you set overflow:scroll
on the body you will make all browsers show the scrollbar by default and it should prevent the jumping.