Skip to content
Related Articles

Related Articles

CSS scroll-padding-right Property

View Discussion
Improve Article
Save Article
  • Last Updated : 30 Jun, 2022

The scroll-padding-right property is used to set all the padding to the right of an scroll container or element at once. The value specified for the scroll-padding-right determines how much of the page that is primarily outside the snap scroll should remain visible.


scroll-padding-right: keyword_values


scroll-padding-right: length_values


scroll-padding-right: Global_Values

Property values: This property accepts three properties mentioned above and described below.

  • length_values: This property refers to the values defined with length units exp: px, em, vh, % etc.
  • keyword_values: This property refers to the keyword_values defined with units like auto. Generally this will be set to 0px by default but it can be non-zero value as well if the non-zero value is more appropriate.
  • Global_Values: This property refers to the global values like inherit, initial, unset, etc.

Example: Below example illustrates the scroll-padding-right property.


<!DOCTYPE html>
        .geek {
            width: 300px;
            height: 275px;
            border: 2px solid black;
            scroll-snap-align: none end;
        .GeeksforGeeks {
            width: 300px;
            height: 300px;
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            scroll-snap-type: x mandatory;
    <div class="GeeksforGeeks" style=
        "scroll-padding-right: 90px;">
        <img src=
        <img src=
        <img src=
        <img src=
        <img src=


Supported Browsers:

  • Chrome 69
  • Firefox 68
  • Edge 79
  • Opera 56
  • Safari 14.1

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!