scroll-padding-block-start
Sets the padding at the start of the scroll container's 'snapping area'. It's applied to the SCROLL CONTAINER and affects how ALL items inside it are positioned when snapped.
It is documented as part of the CSS Scroll Snap specification.
Syntax
/* Usage Example */
.main-scroller {
/* Sets a global 100px buffer for all anchor links inside this container */
scroll-padding-block-start: 100px;
}
/* Syntax */
scroll-padding-block-start: auto;
/* Global values */
scroll-padding-block-start: inherit;
scroll-padding-block-start: initial;
scroll-padding-block-start: revert;
scroll-padding-block-start: revert-layer;
scroll-padding-block-start: unset;
scroll-padding-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.
69+
68+
15+
79+