The scroll-padding-bottom property insets the scrollport at the bottom edge of a scroll container. It helps ensure content is not too close to the bottom when scrolling or scroll snapping.
01
bottom
Physical edge.
02
inset
Scrollport space.
03
length
px, rem, %.
04
container
On scroll box.
05
footer
Bottom inset.
06
snap
Last panels.
Fundamentals
Introduction
The scroll-padding-bottom property in CSS is part of the CSS Scroll Snap Module. It allows you to define inset at the bottom of a scroll container’s scrollport, ensuring that content is not too close to the bottom 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-bottom 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 shorthand. Use it when only the bottom side of the scrollport needs inset.
💡
Beginner Tip
On a normal webpage, scroll-padding-bottom: 20px insets the bottom of the scrollport so the last item is not obscured when you scroll to the end.
Foundation
📝 Syntax
The syntax for the scroll-padding-bottom property is straightforward. It can be applied to any scroll container.
The default value of the scroll-padding-bottom 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 bottom scrollport inset
Part of
scroll-padding shorthand
Accepted values
Lengths, percentages, auto
Set on
Scroll containers
Inherited
No
Animatable
No
Reference
💎 Property Values
Value
Example
Description
length
scroll-padding-bottom: 50px;
Specifies a fixed amount of inset at the bottom edge (e.g., 20px, 2em).
percentage
scroll-padding-bottom: 10%;
Specifies inset as a percentage of the scroll container’s block dimension.
auto
scroll-padding-bottom: auto;
Lets the browser determine the padding automatically.
50px2rem10%
Context
When to Use scroll-padding-bottom
scroll-padding-bottom helps when the bottom side of the scrollport needs inset:
Fixed footers — Inset the scrollport so bottom content is not hidden under fixed UI.
Last snap panel — Add space below the final snap stop in a scroller.
Scroll containers — Prevent snapped content from sitting flush against the container bottom.
Overflow panels — Keep the last line of content visible above the scroll box edge.
For logical block-axis inset, consider scroll-padding-block-end instead. For the top edge, use scroll-padding-top.
Preview
👀 Live Preview
Scroll inside the box. The container uses scroll-padding-bottom: 2rem.
Tall content inside scrollport
The scrollport is inset at the bottom edge so content stops above the container bottom.
Hands-On
Examples Gallery
Start with the reference scroll container example, inset a snap scroller at the bottom, add page bottom inset for fixed footers, and use the longhand alone on a scroll box.
📜 Bottom Scrollport Inset
Inset the scrollport at the bottom edge inside a scroll container — matching the reference example.
Example 1 — scroll-padding-bottom on a scroll container
In this example, we’ll add padding space at the bottom of a scrollable container so the last item is not obscured when scrolled to the bottom.
index.html
<style>.scroll-container{height:200px;overflow-y:scroll;scroll-padding-bottom:20px;}.content{height:600px;background:linear-gradient(to bottom, #ffcc00, #ff6600);}</style><divclass="scroll-container"><divclass="content">
Scroll down to see the padding effect at the bottom.
</div></div>
/* These are equivalent when only the bottom matters */.a{scroll-padding-bottom:2rem;}.b{scroll-padding:002rem0;}
🧠 How scroll-padding-bottom Works
1
Scroll container is configured
A scroll box with scroll-padding-bottom defines bottom inset for its scrollport.
Container
2
Bottom edge insets
The browser shrinks the effective snap area away from the container’s bottom edge.
Inset
3
Content scrolls into place
Snapped or scrolled content lands inside the inset scrollport at the bottom.
Position
=
★
Comfortable bottom stops
Bottom content no longer feels cramped against the scrollport edge.
Compatibility
Browser Compatibility
The scroll-padding-bottom 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 bottom support
Current Chrome, Firefox, Safari, Edge, and Opera support scroll-padding-bottom 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 bottom inset clears fixed footers or bottom UI.
scroll-padding-bottom property97% supported
Bottom line:scroll-padding-bottom is safe to use in modern projects for scroll containers that need bottom inset.
Wrap Up
Conclusion
The scroll-padding-bottom 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 bottom of the scrollport, 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-bottom on the scroll container
Use it with vertical snap scrollers and overflow panels
Match inset to fixed footer or bottom toolbar height
Test last-panel snap behavior on mobile
Prefer scroll-padding-block-end when you need logical block-axis inset
❌ Don’t
Confuse it with padding-bottom layout spacing
Set it on snap targets instead of the scroll container
Use huge percentages without testing on small screens
Forget scroll-padding-top when sticky headers cover top content
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about scroll-padding-bottom
Use these points when insetting bottom scroll containers.
5
Core concepts
★01
auto Default
No inset.
Default
⚙02
bottom
Physical edge.
Axis
◉03
longhand
One side.
Detail
▦04
container
Scroll box.
Scope
▦04
snap
Last panels.
Use case
🔄05
padding
Four sides.
Companion
❓ Frequently Asked Questions
scroll-padding-bottom insets the scrollport at the bottom edge of a scroll container. It creates space so scrolled or snapped content does not sit flush against the bottom of the viewport or overflow box.
scroll-padding-bottom always targets the physical bottom edge. scroll-padding-block-end is logical and follows the block axis, which may map differently in vertical writing modes.
scroll-padding is a shorthand for all four sides. scroll-padding-bottom sets only the bottom inset of the scrollport.
The default value is auto, meaning the browser applies no extra bottom inset unless you specify a length, percentage, or other value.
Use it on scroll containers when bottom content should not sit under fixed footers, browser chrome, or the container edge, such as for last snap panels or overflow scroll boxes.