CSS scroll-padding-inline-start Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Logical Properties

What You’ll Learn

The scroll-padding-inline-start property insets the scrollport at the inline-start edge of a scroll container. It helps ensure content is not too close to the leading inline edge when scrolling or scroll snapping.

01

inline-start

Logical leading edge.

02

inset

Scrollport space.

03

length

px, rem, %.

04

container

On scroll box.

05

carousel

Leading inset.

06

snap

First slides.

Introduction

The scroll-padding-inline-start property in CSS is part of the CSS Scroll Snap Module. It allows you to define inset at the inline-start of a scroll container’s scrollport, ensuring that content is not too close to the leading edge when it is scrolled into view.

This property is especially useful for horizontal carousels, overflow panels, and any scroll container where the first item should not sit flush against the inline-start edge — or where fixed side navigation covers the leading edge.

Definition and Usage

Apply scroll-padding-inline-start to the scroll container — such as a horizontal carousel with overflow-x: auto and scroll snapping enabled.

It is one longhand of the scroll-padding-inline shorthand. Use it when only the inline-start side of the scrollport needs inset.

💡
Beginner Tip

On a normal left-to-right webpage, scroll-padding-inline-start: 20px insets the left side of the scrollport so the first slide stops after the container edge instead of sitting underneath fixed UI.

📝 Syntax

The syntax for the scroll-padding-inline-start property is straightforward. It can be applied to any scroll container.

syntax.css
element {
  scroll-padding-inline-start: length | percentage | auto;
}

Basic Example

inline-start.css
.scroll-container {
  scroll-padding-inline-start: 20px;
}

Related Properties

  • scroll-padding-inline-end — inset at the inline-end edge
  • scroll-padding-inline — shorthand for start and end
  • scroll-padding-left — physical left inset

🎯 Default Value

The default value of the scroll-padding-inline-start property is auto, which means the user agent determines the padding based on its default settings unless you specify a length or percentage.

⚡ Quick Reference

QuestionAnswer
Default valueauto
Horizontal writing modeUsually left scrollport inset in LTR
Part ofscroll-padding-inline shorthand
Accepted valuesLengths, percentages, auto
Set onScroll containers
InheritedNo
AnimatableNo

💎 Property Values

ValueExampleDescription
lengthscroll-padding-inline-start: 50px;Specifies a fixed amount of inset at the inline-start edge (e.g., 20px, 2em).
percentagescroll-padding-inline-start: 10%;Specifies inset as a percentage of the scroll container’s inline size.
autoscroll-padding-inline-start: auto;Lets the browser determine the padding automatically.
50px 2rem 10%

When to Use scroll-padding-inline-start

scroll-padding-inline-start helps when the inline-start side of the scrollport needs inset:

  • First carousel slide — Inset the scrollport so the opening slide is not clipped at the leading edge.
  • Fixed side navigation — Offset snap stops when a sticky sidebar covers the start of the scroller.
  • Horizontal snap panels — Add space before the first snap stop in a scroller.
  • Logical layouts — Prefer inline-start over hard-coded left in RTL-aware sites.

For the inline-end side (usually right in LTR), use scroll-padding-inline-end instead.

👀 Live Preview

Scroll sideways inside the box. The container uses scroll-padding-inline-start: 2rem.

Wide content inside scrollport
Second panel

The scrollport is inset at the inline-start edge so content stops after the leading side.

Examples Gallery

Start with the reference horizontal scroll example, inset a snap carousel at inline-start, add leading-edge inset on a carousel, and use the longhand alone on a scroll box.

📜 Inline-Start Scrollport Inset

Inset the scrollport at the inline-start edge inside a scroll container — matching the reference example.

Example 1 — scroll-padding-inline-start on a scroll container

In this example, we’ll apply a fixed padding of 20px to the inline-start of a horizontal scroll container.

index.html
<style>
  .scroll-container {
    width: 300px;
    height: 200px;
    overflow: auto;
    scroll-padding-inline-start: 20px;
  }

  .content {
    width: 600px;
    height: 150px;
    background: linear-gradient(to right, #ff5733, #33ff57);
  }
</style>

<div class="scroll-container">
  <div class="content">
    Scroll to see the padding effect
  </div>
</div>
Try It Yourself

How It Works

The scroll container’s snap and scroll stop area is inset from the inline-start edge before the browser settles the position.

Example 2 — Snap scroller inline-start inset

Add scroll-padding-inline-start to a horizontal snap container so the first panel does not hug the leading edge.

snap-scroller.css
.snap-box {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 24px;
}
Try It Yourself

How It Works

Container-level inline-start inset applies to every snap stop inside the horizontal scroll box.

📄 Carousels & Layout Insets

Improve leading-edge spacing on horizontal carousels and overflow panels.

Example 4 — Inline-start longhand only

When only inline-start needs inset, use the longhand alone: scroll-padding-inline-start: 3rem;.

longhand-only.css
.scroll-panel {
  scroll-padding-inline-start: 3rem;
}
Try It Yourself

How It Works

Equivalent to scroll-padding-inline: 3rem 0; when only inline-start matters.

scroll-padding-inline-start in the family

scroll-padding-inline-start is the inline-start longhand of scroll-padding-inline. For the opposite side, see scroll-padding-inline-end.

shorthand-equivalent.css
/* These are equivalent when only inline-start matters */
.a { scroll-padding-inline-start: 2rem; }
.b { scroll-padding-inline: 2rem 0; }

🧠 How scroll-padding-inline-start Works

1

Scroll container is configured

A scroll box with scroll-padding-inline-start defines inline-start inset for its scrollport.

Container
2

Inline-start edge insets

The browser shrinks the effective snap area away from the container’s inline-start edge.

Inset
3

Content scrolls into place

Snapped or scrolled content lands inside the inset scrollport at inline-start.

Position
=

Comfortable inline-start stops

Leading content no longer feels cramped against the scrollport edge.

Browser Compatibility

The scroll-padding-inline-start property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.

Logical scroll padding · Modern support

Reliable inline-start support

Current Chrome, Firefox, Safari, Edge, and Opera support scroll-padding-inline-start on scroll containers.

97% Modern browser support
Google Chrome 69+ · Desktop & Mobile
Full support
Mozilla Firefox 68+ · Desktop & Mobile
Full support
Apple Safari 14.1+ · macOS & iOS
Full support
Microsoft Edge 79+ · Chromium
Full support
Opera 56+ · Modern versions
Full support

Testing tip

Test horizontal scroll snapping on mobile browsers to confirm inline-start inset clears the first carousel slide.

scroll-padding-inline-start property 97% supported

Bottom line: scroll-padding-inline-start is safe to use in modern projects for scroll containers that need inline-start inset.

Conclusion

The scroll-padding-inline-start property is a valuable tool for controlling scroll position and padding on scrollable containers.

By adjusting the padding at the inline-start of the scrollport, you can prevent important content from being obscured by fixed or sticky elements and create a smoother navigation experience. Experiment with different values to see how this property can enhance your web designs.

💡 Best Practices

✅ Do

  • Apply scroll-padding-inline-start on the scroll container
  • Use it with horizontal snap scrollers and fixed side navigation
  • Prefer logical inline-start over hard-coded left when possible
  • Match inset to carousel peek width or leading UI
  • Test first-slide snap behavior on mobile

❌ Don’t

  • Set it on snap targets instead of the scroll container
  • Confuse it with padding-inline-start layout spacing
  • Assume inline-start always equals left in every writing mode
  • Use huge percentages without testing on small screens
  • Forget inline-end inset when trailing content needs space too

Key Takeaways

Knowledge Unlocked

Five things to remember about scroll-padding-inline-start

Use these points when insetting inline-start scroll containers.

5
Core concepts
02

inline-start

Logical edge.

Axis
03

longhand

One side.

Detail
04

container

Scroll box.

Scope
05

snap

First slides.

Use case
🔄 06

inline

Shorthand pair.

Companion

❓ Frequently Asked Questions

scroll-padding-inline-start insets the scrollport at the inline-start edge of a scroll container. In horizontal left-to-right writing mode, inline-start is usually the left side.
left is a physical direction. inline-start is logical and follows the document inline flow, so it stays correct in RTL and vertical writing modes.
scroll-padding-inline is a shorthand for both inline-start and inline-end insets. scroll-padding-inline-start sets only the inline-start side of the scrollport.
The default value is auto, meaning the browser applies no extra inline-start inset unless you specify a length, percentage, or other value.
Use it on scroll containers when snapped or scrolled content should not sit flush against the inline-start edge, such as for first carousel slides, leading snap panels, fixed side navigation, or left inset in horizontal overflow boxes.

Practice in the Live Editor

Open the HTML editor and try scroll-padding-inline-start: 20px on a scroll container.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful