IE8 Leaving Space For Unnecessary Scroll Bars

My page is a 3-column header design. This shows up well in IE6 and IE7 (as far as I know). I use javascript to define specific page elements according to the browser window. However, in IE8, it tries to leave spaces for scrollbars, even if they are not displayed, which leads to a spasmodic effect when resizing (the page alternates between leaving a space, and then not).

If I set the overflow: scrolling in my css, this fixes the problem, however I don't want the scroll bars to appear when they are not needed, so this is a temporary fix.

Is there a way so that my page can stretch to the maximum width and height (using javascript) and only get scroll bars if necessary?

+3
source share
3 answers

I think that now you have your thinking, that I thought more about it.

IE7 and below always showed a scroll bar (turning it off if it is not needed). Therefore, when scrolling is required, the user interface does not need to be changed to enable / disable scrolling.

IE8 . , , . , .

overflow:scroll , , .

+2

overflow-x: hidden, . overflow: scroll , , .

, .

0

Source: https://habr.com/ru/post/1721964/


All Articles