Horizontal scroll on mobile with no scroll bar

Create a side scrolling section that works on mobile view without interactions or complex code.

Use case:
You have a single row of tiles that when in mobile view, you would like to be scrolled horizontally, like a native smartphone app. This is not a "sticky" section!

Read on below to see how to achieve this without complex code or interactions. This does not disrupt vertical scrolling.

How it works

From the tablet breakpoint and below, you will be able to scroll left and right without seeing any scroll bars. You will see that the first card has padding, but the subsequent cards overflow past the right edge of the screen.

When you reach the end of the horizontal scroll section, the last tile will have padding so it's not touching the edge of the screen.

It uses CSS to hide the scrollbar

Key points to be aware of:

  • In the html embed, the code targets .horizontal-scroll and hides the scroll bar. It is set to overflow: auto.
  • .horizontal-item-padding makes sure the first and last cards are not touching the edge of the screen.
  • Optional: If instead you want to show and style the scrollbar, in the embed, set display: block; and style the CSS.

Heading

This is a card description.

Heading

This is a card description.

Heading

This is a card description.

Heading

This is a card description.

Heading

This is a card description.