1

I have a div with the property:

overflow-y: scroll;

On IE11 (havent tested other versions of IE yet) the div has a vertical grey scroll bar. Is there a way to remove this? But still maintain the overflow scroll?

I searched SO for an answer but only could find one relating to the body scroll bars and not a div.

panthro
  • 22,779
  • 66
  • 183
  • 324
  • There's no difference between "body scrollbars" and "div scrollbars"; they are the same thing. By the way, this could help: http://stackoverflow.com/questions/16670931/hide-scroll-bar-but-still-being-able-to-scroll – Simone Sep 25 '15 at 14:52

1 Answers1

2

Use auto property

overflow-y: auto;

scroll will always add scrollbar whether content is overflown or not. Using auto will show the scrollbar only when content is overflown.

MDN Doc

Tushar
  • 85,780
  • 21
  • 159
  • 179