2

I'm looking for a way to make the scrollbar invisible in Firefox. That is, you shouldn't be able to see it, but you should still be able to scroll. For other browsers, this works:

::-webkit-scrollbar {display: none;}

However, it seems that this feature has been removed from Firefox. Surely someone has found a workaround just for Firefox?

Nicholas Tomlin
  • 195
  • 1
  • 3
  • 11

1 Answers1

0

If you want to hide scroll bar, you will need the CSS

<body style="overflow:hidden;"> ...</body>

I am wondering, if scroll bar will not be available to your page, how your content is going to be read fully. By the way, this CSS works will all elements like <div></div> etc. too.

For scrolling you will need to add scroll event. Take a reference from here for scroll event handling.

Community
  • 1
  • 1
Kamal Singh
  • 990
  • 8
  • 13
  • Hidden overflow removes the ability to scroll entirely, whereas I'm looking for the option to hide the scrollbar while maintaining scroll functionality. – Nicholas Tomlin Apr 16 '17 at 03:52
  • Yes that is right. If you add `scroll` event handler to `` element, than mouse wheel up.down, will be able to scroll the page. – Kamal Singh Apr 16 '17 at 05:27
  • 1
    There is very good answer in stack overflow [http://stackoverflow.com/questions/16670931/hide-scroll-bar-but-still-being-able-to-scroll](http://stackoverflow.com/questions/16670931/hide-scroll-bar-but-still-being-able-to-scroll). I hope it will solve what you are looking for. – Kamal Singh Apr 16 '17 at 05:33