Help with horizontal scrolling

Hello guys,

I need some help with horizontal scroll.
I want to hide the scrollbar that appears when I set the overflow property to “scroll”. However, when I hide it using CSS (overflow-x: hidden) it stops scrolling.

What am I missing?

Best

You hide the scrollbar with custom css property called -webkit-scrollbar

Hi Luka,

Thank you for your reply.
I’m trying to use the CSS code but it is changing the whole element appearance and not just the scrollbar.

The overflow-y is working as expected but the webkit-scrollbar isn’t

image

Any help on this?

webkit-scrollbar is a pseudo-element, not a property. To add it you need to use a style tag with a selector targeting the right element. See the examples here

I understood what you said but I have no idea how to do it in Weweb.
Could you please elaborate a little more? I’m still new here…

You want to add a html element with something like the examples of the linked page:

<style>
.mostly-customized-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 8px;
  background-color: #aaa; /* or add it to the track */
}
</style>

then you want to add the class to the relevant element. You may need to change the selector depending on what exact element you want to target. Opening the browser’s dev tools and checking the structure of the page will help you with this.