CSS scroll-padding property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxNot supported
Internet ExplorerNot supported
EdgeNot supported
OperaNot supported
Description
CSS scroll-padding property specifies the padding at the top, right, bottom, and left edges of the scroll container.
Please move the scrollbar to see the effect of padding.
Syntax
scroll-padding :scroll-padding-top scroll-padding-right scroll-padding-bottom scroll-padding-left
Property values
+ve length
-
It specifies the top, right, bottom, and left edge padding of the scroll container.
It will add 100px padding to the scroll container.
- Try it
scroll-padding: 100px;
Applicable to
It applies to scroll containers.