CSS CSS Tutorial CSS Advanced CSS Responsive Web Design(RWD) CSS Grid CSS Properties Sass Tutorial Sass Functions



scroll-padding-inline-end

The scroll-padding-inline-end property is a CSS property that is used to specify the padding area for the inline end of an element. This property is used to create space between the content of an element and the scrollbar that appears on the inline end of the element when it overflows. The scroll-padding-inline-end property is used in conjunction with the overflow property to control the behavior of the scrollbar.

The scroll-padding-inline-end property is a relatively new addition to the CSS specification and is not yet widely supported by all browsers. However, it is supported by most modern browsers including Chrome, Firefox, Safari, and Edge.

How to Use the scroll-padding-inline-end Property

The scroll-padding-inline-end property is used to specify the amount of padding that should be added to the inline end of an element when it overflows. The value of the property can be specified in any valid CSS length unit such as pixels, ems, or percentages.

Here is an example of how to use the scroll-padding-inline-end property:

<style>
  .example {
    overflow-x: scroll;
    scroll-padding-inline-end: 20px;
  }
</style>

<div class="example">
  <p>This is some example text that will overflow the container.</p>
</div>

In this example, the scroll-padding-inline-end property is used to add 20 pixels of padding to the inline end of the .example element when it overflows. This creates space between the content of the element and the scrollbar that appears on the inline end of the element.

Browser Support for scroll-padding-inline-end

The scroll-padding-inline-end property is a relatively new addition to the CSS specification and is not yet widely supported by all browsers. However, it is supported by most modern browsers including Chrome, Firefox, Safari, and Edge.

Here is a table showing the browser support for the scroll-padding-inline-end property:

Browser Version Support
Chrome 69+ Supported
Firefox 63+ Supported
Safari 11.1+ Supported
Edge 17+ Supported
Internet Explorer N/A Not Supported

Conclusion

The scroll-padding-inline-end property is a useful CSS property that is used to create space between the content of an element and the scrollbar that appears on the inline end of the element when it overflows. This property is a relatively new addition to the CSS specification and is not yet widely supported by all browsers. However, it is supported by most modern browsers including Chrome, Firefox, Safari, and Edge.

References

Activity