user2653364 user2653364 - 10 months ago 104
CSS Question

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!

Answer Source

You can use:

-ms-overflow-style: scrollbar

Instead of none. Source:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download