Web4College

CSS scroll-padding property

src

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 Default

0

There is no padding of the scroll container.

scroll-padding: 0;
Try it

+ve length

100

It specifies the top, right, bottom, and left edge padding of the scroll container.

It will add 100px padding to the scroll container.

scroll-padding: 100px;
Try it

Applicable to

It applies to scroll containers.