Overflow: auto in IE7 leaves room for scrollbar when resizing

Since the client requested it, I changed the div to

position: absolute;
top: 5px;
bottom: 5px;
overflow: auto;
min-width: 945px;

which basically works fine in all supported browsers (IE7, IE8, Firefox 3+): it forces the div to fill the available area vertically and show a vertical scroll bar if it doesn't fit. Please note that without a minimum width of 945px, the scroll bar will overlap some of the content, as the content will not be changed correctly if the scroll bar is added to all versions of Internet Explorer. With a minimum width, it fits, and other browsers do not care.

However, in IE7, if a vertical scrollbar is displayed, and then the browser window expands vertically so that the scrollbar is no longer needed, IE7 removes the scrollbar, but leaves an empty rectangle where the scrollbar was, that is, the contents of the div do not extend to the previous area of ​​the bar scroll. When you reload the page in the same window, this is normal. IE8 does not show this problem in standard mode.

How can i solve this?

+2
source share
2 answers

it sounds to me as if there is an error in ie7 or your ie7 specifically. as for your code, its subtle, albeit a bit strange, do you want the div to scroll horizontally?

+1
source

IE7 (, , IE8 ).

. IE7 : auto , , ( , "" ). , : ( ).

0

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


All Articles