A horizontal gallery can stop with one card almost centred and the next barely visible. CSS scroll snapping lets the browser settle scrolling near defined positions, which can make a sequence of cards easier to browse. The feature needs both a scrolling container and suitable positions inside it.
MDN’s scroll-snap-type reference describes the axis and strictness of snapping. A common starting point for a horizontal gallery is scroll-snap-type: x proximity; individual cards can use scroll-snap-align: start. The container must actually allow horizontal overflow for the arrangement to behave as intended.
Choose how strongly the browser should settle
proximity lets the browser decide when a nearby snap position should be used. mandatory requires settling at a snap position when scrolling finishes, subject to the specification’s behaviour. The stronger option is not automatically a better experience.
Consider a card taller than the available viewing area. If the design insists on a particular alignment without accommodating its content, reaching all of the text may become awkward. MDN’s scroll-snap guide explains the relationship between the container and its child elements, including practical considerations for layout.
Test the content, not only the animation
Try the gallery with a short card, a long card and an image that loads slowly. Increase text size and zoom. Check whether the beginning and end of the sequence remain reachable, and whether the browser’s settled position leaves meaningful content visible.
Then use the keyboard and a touch screen. Links and controls inside cards should remain understandable and usable; a pleasing drag gesture does not prove that the whole interaction works for someone navigating another way.
Keep essential information in the normal document structure. Snapping is a scrolling aid, not a reason to hide instructions or make a user discover a precise gesture before they can continue.
A good result feels modest: the gallery lands in useful places while users retain control of the page. If snapping makes reading harder, adjust the layout or remove it rather than adding more movement to compensate.

