CSS scroll-padding-inline property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxNot supported
Internet ExplorerNot supported
EdgeNot supported
OperaNot supported
Description
CSS scroll-padding-inline property specifies the padding at the start and end edges of the scroll container. Please move the scrollbar to see the effect of padding.
The selection of start and end sides depends upon the writing-mode.
The start and end sides are left and right sides respectively for horizontal-tb writing-mode.
The start and end sides are top and bottom sides respectively for vertical-* writing-mode.
Syntax
scroll-padding-inline :+ve length
Property values
+ve length Default
-
There is no padding at the start and end edges of the scroll container.
- Try it
scroll-padding-inline: 0px; +ve length
-
It specifies the padding at the start and end edges of the scroll container.
In the demo, there is 100px padding at the start and end edges of the scroll container.
- Try it
scroll-padding-inline: 100px;
Applicable to
It applies to scroll containers.