"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Comparison of hidden Firefox scrollbar tips with Webkit

Comparison of hidden Firefox scrollbar tips with Webkit

Posted on 2025-04-13
Browse:200

How to Hide Scrollbars in Firefox: A Comparison with Webkit?

Hiding Scrollbars in Firefox: A Comparison to Webkit

To create a scrollable div without visible scrollbars, Webkit browsers provide a straightforward solution by adjusting the scrollbars' dimensions. However, replicating this functionality in Firefox requires a slightly different approach.

In Firefox, the desired effect can be achieved by wrapping the scrollable div within an additional div and applying the overflow:hidden property to the outer div. This prevents the scrollbars from being displayed.

#outer-div {
  overflow: hidden;
}

#scrollable-div {
  overflow-x: scroll;
  overflow-y: hidden;
}

This CSS code, as demonstrated in the provided JSFiddle example (http://jsfiddle.net/qqPcb/), allows for scrolling without the distraction of visible scrollbars.

It is worth noting that this technique is employed by the popular jQuery plugin, jScrollPane, providing a convenient and cross-browser solution for hiding scrollbars when desired.

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3