scroll-margin-inline-start
Sets the snap margin at the 'start' of an element in the text flow (usually the left side in English). This is great for horizontal carousels to keep the current item from hugging the left edge.
Quick example
.carousel-item {
/* Keeps the item 40px away from the left edge when it snaps into view */
scroll-margin-inline-start: 40px;
scroll-snap-align: start;
} Quick facts
Initial value
0Inherited
No
Applies to
all elements
Animation type
byComputedValueType
scroll-margin-inline-start Browser Support
Widely available Since 2020 95% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.
Safe to use without fallbacks.
69+
68+
15+
79+