Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable -ms-overflow-style "auto-hide" without disabling the bar completely

In IE11, my website bodies scrollbar keeps disappearing and re-appearing whenever the cursor goes into the page and out. I read that the IE-exclusive '-ms-overflow-style' CSS style is the problem. I set the following 2 CSS properties onto my body element:

body {
    -ms-overflow-style: none !important;
    overflow-y: auto;
}

I still want the scrollbar to appear when there is overflowing content which could vary depending on the browsers window height. I just don't want it to disappear and reappear in IE this "auto-hide" feature. Basically, I want it to behave the same as FF and Chrome.

Problem is, it seems that once I set '-ms-overflow-style' to 'none', IE11 ignores 'overflow-y' also. Very frustrating.

If my grammar is bad, sorry, I'm tired.

Thanks in advance!

like image 548
user2653364 Avatar asked Jan 09 '23 11:01

user2653364


1 Answers

You can use:

-ms-overflow-style: scrollbar

Instead of none. Source: http://msdn.microsoft.com/en-us/library/windows/apps/hh441298.aspx

like image 126
Gaunt Avatar answered May 02 '23 00:05

Gaunt