Hide scroll bar, but while still being able to scroll

Ask a question+

I want to be able to scroll through the whole page, but without the scrollbar being shown.

I need to compatible for all browsers.

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

Majedur 0
add comment

1 Answer


According to W3Schools, not all browsers support custom scrollbars. This means that you will have to approach the this a different way…

The only other way that I can actually think of to hide the scrollbar while still being able to scroll is to make the element have a width larger than the display size. So do something like this:

#[elements id] {
    width: calc(100% + [scrollbar width])

If I find another way I will let you know, but for now… that is possibly the only way…

Dark Vortex 0
add comment

Your Answer