scroll-margin-block-start
Sets the 'snap margin' at the start of an element. This is perfect for ensuring that when you scroll to a section, your 'sticky' header doesn't cover up the section's' title.
Quick example
section {
/* Prevents a sticky header (fixed to top) from covering the section heading */
scroll-margin-block-start: 80px;
scroll-snap-align: start;
} Quick facts
Initial value
0Inherited
No
Applies to
all elements
Animation type
byComputedValueType
scroll-margin-block-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+