Skip to content
Related Articles

Related Articles

CSS scroll-padding-left Property

View Discussion
Improve Article
Save Article
  • Last Updated : 09 Sep, 2020

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







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

  • length_values: This property refers to the values defined with length units. Ex: 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 a 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-left property.


<!DOCTYPE html>
        .geek {
            width: 275px;
            height: 300px;
            border: 2px solid red;
            scroll-snap-align: none start;
        .GeeksforGeeks {
            width: 300px;
            height: 300px;
            border: 2px solid green;
            text-align: center;
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            scroll-snap-type: x mandatory;
    <div class="GeeksforGeeks" style=
            "scroll-padding-left: 80px;">
        <img src=
        <img src=
        <img src=
        <img src=
        <img src=


Supported Browsers:

  • Chrome
  • Firefox
  • Opera
  • Edge
  • Safari (Partially Supported)
  • Internet Explorer (Not Supported)

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!