CSS scroll-padding-block-end Property

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

What You’ll Learn

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

01

block-end

Logical bottom.

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-block-end property in CSS is part of the CSS Scroll Snap Module. It allows you to define padding at the end 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-end 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-end side of the scrollport needs inset.

💡
Beginner Tip

On a normal webpage, scroll-padding-block-end: 20px insets the bottom of the scrollport so content stops above the container edge.

📝 Syntax

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

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

Basic Example

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

Related Properties

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

🎯 Default Value

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

💎 Property Values

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

When to Use scroll-padding-block-end

scroll-padding-block-end helps when the block-end 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.
  • Logical layouts — Prefer block-end over hard-coded bottom in international sites.

For the block-start side (usually top), use scroll-padding-block-start instead.

👀 Live Preview

Scroll inside the box. The container uses scroll-padding-block-end: 2rem.

Tall content inside scrollport

The scrollport is inset at the block-end edge so content stops above the bottom.

Examples Gallery

Start with the reference scroll container example, inset a snap scroller at block-end, add page bottom inset, and use the longhand alone on a scroll box.

📜 Block-End Scrollport Inset

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

Example 1 — scroll-padding-block-end on a scroll container

In this example, we’ll set scroll-padding-block-end to 20px for a scrollable container.

index.html
<style>
  .scroll-container {
    height: 200px;
    overflow-y: scroll;
    scroll-padding-block-end: 20px;
  }

  .content {
    height: 500px;
    background: linear-gradient(to bottom, #f06, #4a90e2);
  }
</style>

<div class="scroll-container">
  <div class="content"></div>
</div>
Try It Yourself

How It Works

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

Example 2 — Snap scroller block-end inset

Add scroll-padding-block-end 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-block-end: 24px;
}
Try It Yourself

How It Works

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

📄 Page & Layout Insets

Improve bottom spacing on page scrollports and overflow panels.

Example 4 — Block-end longhand only

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

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

How It Works

Equivalent to scroll-padding-block: 0 3rem; when only block-end matters.

scroll-padding-block-end in the family

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

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

🧠 How scroll-padding-block-end Works

1

Scroll container is configured

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

Container
2

Block-end edge insets

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

Inset
3

Content scrolls into place

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

Position
=

Comfortable block-end stops

Bottom content no longer feels cramped against the scrollport edge.

Browser Compatibility

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

Current Chrome, Firefox, Safari, Edge, and Opera support scroll-padding-block-end 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-end inset clears fixed footers or bottom UI.

scroll-padding-block-end property 97% supported

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

Conclusion

The scroll-padding-block-end 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 end 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-end on the scroll container
  • Use it with vertical snap scrollers and overflow panels
  • Prefer logical block-end over hard-coded bottom when possible
  • Match inset to fixed footer or bottom toolbar height
  • Test last-panel snap behavior on mobile

❌ Don’t

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

Key Takeaways

Knowledge Unlocked

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

Use these points when insetting block-end scroll containers.

5
Core concepts
02

block-end

Logical edge.

Axis
03

longhand

One side.

Detail
04

container

Scroll box.

Scope
04

snap

Last panels.

Use case
🔄 05

block

Shorthand pair.

Companion

❓ Frequently Asked Questions

scroll-padding-block-end insets the scrollport at the block-end edge of a scroll container. In horizontal writing mode, block-end is usually the bottom.
bottom is a physical direction. block-end 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-end sets only the block-end side of the scrollport.
The default value is auto, meaning the browser applies no extra block-end 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-end edge, such as for fixed footers, last snap panels, or bottom inset in overflow boxes.

Practice in the Live Editor

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