CSS scroll-padding property

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

There is no padding of the scroll container.

scroll-padding: 0;

+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.

scroll-padding: 100px;

Applicable to

It applies to scroll containers.

#CSS digger
Was this article helpful?

 
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
×

Ctrl+D