CSS scroll-margin-top property

Description

CSS scroll-margin-top property specifies the margin at the top side of the scroll item.

Please move the scrollbar to see the effect of margin.

Syntax

scroll-margin-top :+ve length

Property values

+ve length Default

There is no margin at the top edge of the scroll item.

scroll-margin-top: 0px;

+ve length

It specifies the top edge offset of the scroll item.

In the demo, there is 100px margin at the top edge of the scroll item.

scroll-margin-top: 100px;

Applicable to

It applies to scroll containers.

#CSS digger
Was this article helpful?

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

Ctrl+D