0

I want to hide the scroll bar that appears on a grid while scrolling in Firefox, however I would still be able to want to scroll freely without the scrollbar to appear visually. I tired this:

.grid {
   scrollbar-width: none;
}

However, this hides the scrollbar vertically, and not horizontally. I want the vertical scroll to remain as is and hide the horizontal one. Is there any other property that would help to achieve this?

Andy Hoffman
  • 18,436
  • 4
  • 42
  • 61
user1234
  • 3,000
  • 4
  • 50
  • 102
  • scrollbar-height =none; ? – anneb Apr 02 '20 at 00:08
  • I dont think there is any such property called scrollbar-height, atleast I couldnt find it in the CSS developer tools, it gave error – user1234 Apr 02 '20 at 00:23
  • @user1234 Sorry i was in a bit of a hurry when i was writing the answer i didn't even see that you specified FireFox, unfortunately you can't style the scrollbar in FF, refer to this [answer](https://stackoverflow.com/a/22244139/7148391) – Rainbow Apr 02 '20 at 10:30

1 Answers1

0

Try this code in userChrome.css (you may have to adjust the margin values):

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

:-moz-any(#content,#appcontent) browser{
 margin-right:-14px!important;
 overflow-y:scroll;
 margin-bottom:-14px!important;
 overflow-x:scroll;
}
Makwana Prahlad
  • 1,025
  • 5
  • 20