CSS scroll-padding-block-start Property

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

What You’ll Learn

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

01

block-start

Logical top.

02

inset

Scrollport space.

03

length

px, rem, %.

04

container

On scroll box.

05

header

Top inset.

06

snap

First panels.

Introduction

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

This property is especially useful for improving the readability and usability of content within scrollable containers.

Definition and Usage

Apply scroll-padding-block-start to the scroll container — such as html or an element with overflow: auto and scroll snapping enabled.

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

💡
Beginner Tip

On a normal webpage, scroll-padding-block-start: 4rem insets the top of the scrollport so anchor links land below a fixed header.

📝 Syntax

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

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

Basic Example

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

Related Properties

  • scroll-padding-block-end — inset at the block-end edge
  • scroll-padding-block — shorthand for start and end
  • scroll-padding-top — physical top inset

🎯 Default Value

The default value of the scroll-padding-block-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 top scrollport inset
Part ofscroll-padding-block shorthand
Accepted valuesLengths, percentages, auto
Set onScroll containers
InheritedNo
AnimatableNo

💎 Property Values

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

When to Use scroll-padding-block-start

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

  • Fixed headers — Inset the scrollport so top content is not hidden under sticky or fixed navigation.
  • First snap panel — Add space above the first snap stop in a vertical scroller.
  • Scroll containers — Prevent snapped content from sitting flush against the container top.
  • Logical layouts — Prefer block-start over hard-coded top in international sites.

For the block-end side (usually bottom), use scroll-padding-block-end instead.

👀 Live Preview

Scroll inside the box. The container uses scroll-padding-block-start: 2rem below the sticky label.

Sticky nav simulation
Tall content inside scrollport

The scrollport is inset at the block-start edge so content stops below the top.

Examples Gallery

Start with the reference snap container example, inset a snap scroller at block-start, add page top inset for fixed headers, and use the longhand alone on a scroll box.

📜 Block-Start Scrollport Inset

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

Example 1 — scroll-padding-block-start on a snap container

In this example, we’ll set scroll-padding-block-start to 20px on a vertical snap scroll container.

index.html
<style>
  .scroll-container {
    width: 300px;
    height: 200px;
    overflow: auto;
    scroll-snap-type: y mandatory;
    scroll-padding-block-start: 20px;
  }

  .scroll-item {
    height: 150px;
    scroll-snap-align: start;
  }
</style>

<div class="scroll-container">
  <div class="scroll-item">Item 1</div>
  <div class="scroll-item">Item 2</div>
  <div class="scroll-item">Item 3</div>
</div>
Try It Yourself

How It Works

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

Example 2 — Snap scroller block-start inset

Add scroll-padding-block-start to a vertical snap container so the first panel does not hug the top edge.

snap-scroller.css
.snap-box {
  overflow: auto;
  scroll-snap-type: y mandatory;
  scroll-padding-block-start: 24px;
}
Try It Yourself

How It Works

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

📄 Page & Layout Insets

Improve top spacing on page scrollports and overflow panels.

Example 3 — Page top inset for fixed header

Set scroll-padding-block-start on html so page scrolling leaves space at the block-start edge below a fixed header.

page-top.css
html {
  scroll-padding-block-start: 4rem;
}
Try It Yourself

How It Works

Page-level inset helps anchor links and snapped sections land below fixed headers or sticky navigation.

Example 4 — Block-start longhand only

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

longhand-only.css
html {
  scroll-padding-block-start: 3.5rem;
}
Try It Yourself

How It Works

Equivalent to scroll-padding-block: 3.5rem 0; when only block-start matters.

scroll-padding-block-start in the family

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

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

🧠 How scroll-padding-block-start Works

1

Scroll container is configured

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

Container
2

Block-start edge insets

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

Inset
3

Content scrolls into place

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

Position
=

Comfortable block-start stops

Top content no longer feels cramped against the scrollport edge.

Browser Compatibility

The scroll-padding-block-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 block-start support

Current Chrome, Firefox, Safari, Edge, and Opera support scroll-padding-block-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 scroll snapping on mobile browsers to confirm block-start inset clears fixed headers or top UI.

scroll-padding-block-start property 97% supported

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

Conclusion

The scroll-padding-block-start property is a valuable addition to the CSS toolkit, providing better control over scroll behavior and padding of scrollable containers.

By adjusting the padding at the start of the block axis, you can improve the overall user experience, ensuring that content is more readable and visually appealing. Experiment with different values to see how this property can enhance your web designs.

💡 Best Practices

✅ Do

  • Apply scroll-padding-block-start on the scroll container
  • Use it with vertical snap scrollers and overflow panels
  • Prefer logical block-start over hard-coded top when possible
  • Match inset to fixed header or sticky navigation height
  • Test first-panel snap behavior on mobile

❌ Don’t

  • Set it on snap targets instead of the scroll container
  • Confuse it with padding-block-start layout spacing
  • Assume block-start always equals top in every writing mode
  • Use huge percentages without testing on small screens
  • Forget block-end inset when fixed footers cover bottom content

Key Takeaways

Knowledge Unlocked

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

Use these points when insetting block-start scroll containers.

5
Core concepts
02

block-start

Logical edge.

Axis
03

longhand

One side.

Detail
04

container

Scroll box.

Scope
05

snap

First panels.

Use case
🔄 06

block

Shorthand pair.

Companion

❓ Frequently Asked Questions

scroll-padding-block-start insets the scrollport at the block-start edge of a scroll container. In horizontal writing mode, block-start is usually the top.
top is a physical direction. block-start is logical and follows the document block flow, so it stays correct in vertical writing modes.
scroll-padding-block is a shorthand for both block-start and block-end insets. scroll-padding-block-start sets only the block-start side of the scrollport.
The default value is auto, meaning the browser applies no extra block-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 block-start edge, such as for fixed headers, first snap panels, or top inset in overflow boxes.

Practice in the Live Editor

Open the HTML editor and try scroll-padding-block-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