CSS scroll-padding-inline-end Property
Description
The scroll-padding-inline-end property lets you reserve space on the inline‑end side of a scroll container that the browser uses when calculating snapping points and when determining the final position of content brought into view. Rather than adding physical padding that shifts layout, this logical inset tells the scrolling machinery to treat the scroller’s effective viewport as if that inset existed at the inline end, so snapped or scrolled-to elements stop short of the container’s edge by that amount.
This inset directly affects how snap positions are computed for containers that use scroll-snap-type and how items align if they participate in snapping via scroll-snap-align. When a snap is resolved or the browser performs a bring‑into‑view operation, the computed target positions are adjusted inward by the value of the inline‑end scroll padding, which can prevent content from being obscured by overlays or fixed UI positioned at that side.
Because it is a logical property, scroll-padding-inline-end follows writing mode and direction: inline‑end maps to the physical right side in left‑to‑right horizontal writing modes, to the left side in right‑to‑left modes, and to a different physical axis in vertical writing modes. It is most often used alongside the other scroll padding properties (for example, scroll-padding-inline-start or the shorthand scroll-padding) to create consistent insets on multiple sides of a scroll container.
In practice, use scroll-padding-inline-end to ensure the last item in a horizontal carousel doesn’t get pressed up against an overlay or edge, to provide breathing room for keyboard or focus navigation so focused items aren’t hidden, or to align snapped elements predictably when UI components occupy the inline‑end side of the viewport. Remember it alters scrolling and snapping calculations rather than the physical box model of children, so it’s a layout‑friendly way to influence where scrolled content ends up without changing element dimensions.
Definition
- Initial value
- auto
- Applies to
- scroll containers
- Inherited
- no
- Computed value
- as specified
- Animatable
- by computed value type
- JavaScript syntax
- object.style.scrollPaddingInlineEnd
Interactive Demo
Syntax
scroll-padding-inline-end: auto | &tl;length-percentage [0,∞]>
Values
- autoThe offset is determined by the user agent. This will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
- &tl;length-percentage>An inwards offset from the corresponding edge of the scrollport, as a valid length or a percentage.
Example
Browser Support
The following information will show you the current browser support for the CSS scroll-padding-inline-end property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
