#
#
# artur #2020-05-11 14:45:00
css
# artur #, 2020-05-11 14:45:00

How to do horizontal scrolling without a scrollbar?

Hello.

For several days I have been trying to solve the issue with horizontal scrolling of blocks that would go off the screen and at the same time the scrollbar should not appear

. There are many solutions that work on mobile devices, but there is no good working option for all devices, including desktop browsers.

I tried:

https://www.npmjs.com/package/iscroll - only works if body has overflow-x: hidden; while on mobile, when scrolling the page, if you touch the block with iscroll vertically, the page does not scroll, i.e. to continue scrolling the page, you need to touch any other content with your finger.

https://kenwheeler.github.io/slick/- you have to add additional styles to parent divs, on PC it seems to work, but on mobile, with different sizes of child blocks, you have to change the plugin settings and you can’t do free scrolling so that you can stop the scroll position where you need it, but the plugin tries to show a whole block in the middle of the screen even if this block does not fit ...

Ideally, I would like it to be in pure css, but it seems that this is not realistic.

Has anyone researched this issue? Any good solutions?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question