CSS scroll-padding-top property

Description

CSS scroll-padding-top property represents padding at the top edge of the scroll container.

Please move the scrollbar to see the effect of padding.

Syntax

scroll-padding-top :+ve length

Property values

+ve lengthDefault

There is no padding at the top edge of the scroll container.

scroll-padding-top: 0px;

+ve length

It specifies the top edge padding of the scroll container.

In the demo, there is 100px padding at the top edge of the scroll container.

scroll-padding-top: 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