CSS scroll-padding-bottom Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Scroll Snap

What You’ll Learn

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.

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.

📝 Syntax

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

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

Basic Example

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

Related Properties

  • scroll-padding-top, scroll-padding-left, scroll-padding-right
  • scroll-padding — shorthand for all four sides
  • scroll-padding-block-end — logical block-end inset

🎯 Default Value

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.

⚡ Quick Reference

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

💎 Property Values

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

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.

👀 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.

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>

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

How It Works

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

Example 2 — Snap scroller bottom inset

Add scroll-padding-bottom to a vertical snap container so the last panel does not hug the bottom edge.

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

How It Works

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

📄 Page & Layout Insets

Improve bottom spacing on page scrollports and overflow panels.

Example 4 — Bottom longhand only

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

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

How It Works

Equivalent to scroll-padding: 0 0 3rem 0; when only the bottom matters.

scroll-padding-bottom in the family

scroll-padding-bottom is the bottom longhand of scroll-padding. For the opposite side, see scroll-padding-top.

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

🧠 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.

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 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 bottom inset clears fixed footers or bottom UI.

scroll-padding-bottom property 97% supported

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

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.

💡 Best Practices

✅ Do

  • 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

Key Takeaways

Knowledge Unlocked

Five things to remember about scroll-padding-bottom

Use these points when insetting bottom scroll containers.

5
Core concepts
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.

Practice in the Live Editor

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