Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hidden scrollbars in Firefox (allows scrolling but just no scrollbar)

I'd like to create a div that is able to scroll but does not display scrollbars. I have found a solution for Webkit (below) but how can this be done in other browsers?

I'd prefer to avoid using a javascript plugin. Hoping to find a CSS or vendor specific solution.


Webkit Solution

#photoreel::-webkit-scrollbar {     height: 0;     width: 0; } #photoreel {     overflow-x: scroll;     overflow-y: hidden; } 
like image 522
Matt Avatar asked Apr 28 '11 14:04

Matt


People also ask

How do I get my scroll bar back on Firefox?

"On Windows, Firefox follows the system preference (System Preferences > Accessibility > Visual Effects > Always show scrollbars)."

How do I scroll with scrollbar hidden?

To hide the scrollbar and disable scrolling, we can use the CSS overflow property. This property determines what to do with content that extends beyond the boundaries of its container. To prevent scrolling with this property, just apply the rule overflow: hidden to the body (for the entire page) or a container element.


1 Answers

You must wrap your scrollable div in another div with overflow:hidden that hides the scrollbar.

See http://jsfiddle.net/qqPcb/ for an example.

BTW: The same technique is used by a nice little jQuery plugin called jScrollPane

like image 118
user123444555621 Avatar answered Sep 21 '22 16:09

user123444555621