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.
Fundamentals
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.
Foundation
📝 Syntax
The syntax for the scroll-padding-block-start property is straightforward. It can be applied to any scroll container.
scroll-padding-block-end — inset at the block-end edge
scroll-padding-block — shorthand for start and end
scroll-padding-top — physical top inset
Defaults
🎯 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.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
auto
Horizontal writing mode
Usually top scrollport inset
Part of
scroll-padding-block shorthand
Accepted values
Lengths, percentages, auto
Set on
Scroll containers
Inherited
No
Animatable
No
Reference
💎 Property Values
Value
Example
Description
length
scroll-padding-block-start: 50px;
Specifies a fixed amount of inset at the block-start edge (e.g., 20px, 2em).
percentage
scroll-padding-block-start: 10%;
Specifies inset as a percentage of the scroll container’s block dimension.
auto
scroll-padding-block-start: auto;
Lets the browser determine the padding automatically.
50px2rem10%
Context
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.
Preview
👀 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.
Hands-On
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.
/* These are equivalent when only block-start matters */.a{scroll-padding-block-start:2rem;}.b{scroll-padding-block:2rem0;}
🧠 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.
Compatibility
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 Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox68+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · 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 property97% supported
Bottom line:scroll-padding-block-start is safe to use in modern projects for scroll containers that need block-start inset.
Wrap Up
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.
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
Summary
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
★01
auto Default
No inset.
Default
⚙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.