CSS overscroll-behavior-inline Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The overscroll-behavior-inline property sets what the browser does when scrolling hits the inline-axis edge of a scroll container. In horizontal writing modes such as English, the inline axis is horizontal: left and right edges.

Use it on carousels, tab strips, and wide tables so sideways overscroll does not move a parent scroll area. Pair it with overflow-x: auto or overflow: auto. For both axes at once, use overscroll-behavior.

Limited availability.

Not deprecated and not experimental, but MDN marks it Limited availability: Safari support starts at 16, and the newer chain value is missing in Safari and older Chromium/Firefox builds.

CSS Syntax

syntax.css
overscroll-behavior-inline: auto | contain | none | chain | initial | inherit;

Property Values

ValueDescriptionTry it
autoDefault. Allows normal overscroll and scroll chaining on the inline axisTry it
containStops scroll chaining. Local bounce may still occurTry it
noneStops scroll chaining and disables overscroll bounceTry it
chainAllows chaining, but blocks bounce. Limited availabilityTry it
initialSets this property to its default value, autoTry it
inheritInherits this property from the parent elementTry it

How to Use overscroll-behavior-inline

Make a sideways scrollable box, then decide what happens when the user reaches its left or right edge.

  1. Give the element a fixed width and make it scroll with overflow-x: auto or overflow: auto.
  2. Put content wider than the box so a horizontal scrollbar appears (in horizontal writing).
  3. Set overscroll-behavior-inline on that same scroll container. It is not inherited.
  4. Choose contain for most carousels and tab strips, or none when bounce must also stop.
PieceRequired?Role
Scroll containerYesNeeds overflow and content that can scroll on the inline axis
KeywordYesauto, contain, none, or chain
Parent scroll areaFor demosNeeded to feel scroll chaining when the value is auto

Live Preview

Scroll the white strip left or right to an edge, then keep scrolling. Change the value and compare how the outer dashed area reacts.

Inner strip scrolls first. Extra scroll at the edge may move the outer stage when the value allows chaining.

Nested horizontal scroll
One Two Three Four Five Six
Outer A Outer B Outer C

overscroll-behavior-inline: contain

CSS Examples

Each snippet adds only what overscroll-behavior-inline needs: a sideways scroll box and a keyword. Use Try It Yourself for a live editor.

Example 1 — Contain Inline-Axis Chaining

Stop a parent from scrolling sideways when a nested strip hits its left or right edge.

CSS
<style>
  .strip {
    width: 200px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border: 1px solid #ccc;
    white-space: nowrap;
  }
</style>

<div class="strip">
  <span>One</span>
  <span>Two</span>
  <span>Three</span>
  <span>Four</span>
  <span>Five</span>
</div>
Try It Yourself

How It Works

  1. Make the box scroll sideways. width: 200px plus overflow-x: auto creates a horizontal scroll area.
  2. Fill past the width. white-space: nowrap keeps the items on one line that is wider than the box.
  3. Contain the overscroll. overscroll-behavior-inline: contain stops edge scroll from chaining to a parent.
  4. Bounce may remain. Local bounce can still appear. Use none if you need that gone too.

Example 2 — Disable Chaining and Bounce

Use none when inline-axis bounce or side-swipe navigation should not fire from a nested strip.

CSS
<style>
  .tabs {
    width: 220px;
    overflow-x: auto;
    overscroll-behavior-inline: none;
    border: 1px solid #ccc;
    white-space: nowrap;
  }
</style>

<div class="tabs">
  <span>Home</span>
  <span>Docs</span>
  <span>Blog</span>
  <span>Shop</span>
  <span>Help</span>
</div>
Try It Yourself

How It Works

  1. Same scroll setup. A fixed width and overflow-x: auto make the tabs a horizontal scroll container.
  2. Reach the inline edge. Scrolling past the first or last tab hits the left or right boundary.
  3. Turn off both effects. none stops chaining to parents and also blocks overscroll bounce.
  4. Mobile tip. This helps when a nested strip should not trigger browser back/forward swipe gestures.

Edge Cases & Pitfalls

If sideways overscroll still moves a parent, one of these is usually why.

overflow

It only applies to scroll containers

Without overflow that can scroll sideways, the property has nothing to control. Set overflow-x: auto on the same element.

axis

Inline is not always horizontal

With writing-mode: vertical-rl, the inline axis is vertical. Prefer overscroll-behavior-x when you mean physical left and right every time.

chain

chain is newer

chain allows scroll chaining without bounce, but support is Limited availability. Prefer contain or none for production UIs today.

swipe

Browser history swipe can still appear

On some mobile browsers, edge swipes navigate history. contain or none can reduce that from nested strips, but behavior still varies by platform.

shorthand

Do not confuse with the shorthand

overscroll-behavior sets both axes. This longhand only affects the inline axis. Use overscroll-behavior-block for the other axis.

Browser Support

overscroll-behavior-inline is a browser CSS property for scroll containers. Node.js, Deno, and Bun do not apply it.

✓ Limited availability · Safari 16+

overscroll-behavior-inline

auto, contain, and none: Chrome 77+, Firefox 73+, Safari 16+, Edge 79+. chain: Chrome 150+, Firefox 157+, Edge 150+; not in Safari.

96% auto / contain / none
Google Chrome 77+ · chain in 150+
Full support
Mozilla Firefox 73+ · chain in 157+
Full support
Apple Safari 16+ · no chain
Partial
Microsoft Edge 79+ · chain in 150+
Full support
Opera 64+ · chain in 134+
Full support
Samsung Internet 12+
Full support
Internet Explorer Not supported
Not supported
overscroll-behavior-inline Widely supported (core values)

Bottom line: Safe for auto, contain, and none in current evergreen browsers and Safari 16+. Treat chain as Limited availability. Internet Explorer has no support.

Key Takeaways

  • Role: control overscroll at the inline-axis edge of a scroll container.
  • Common pick: contain for carousels and tabs; none when bounce must stop too.
  • Logical axis: horizontal in English; follows writing-mode.
  • Initial value: auto. Not inherited. Needs a horizontal scroll container.

One line: overscroll-behavior-inline decides whether inline-axis overscroll chains out of a nested sideways scroll box.

Frequently Asked Questions

It controls what happens when scrolling reaches the inline-axis edge of a scroll container. In horizontal writing modes such as English, that edge is the left or right.
It is when scrolling past the left or right edge of one box continues scrolling a parent or the page behind it. contain and none stop that on the inline axis.
Use contain to stop inline-axis scroll chaining while still allowing local bounce. Use none when you also want to disable bounce and side-swipe navigation effects.
overscroll-behavior-inline follows writing mode: horizontal in English, vertical in vertical writing. overscroll-behavior-x always targets the physical horizontal axis.
No. Set it on the scroll container itself. The initial value is auto.
Chrome 77+, Firefox 73+, Safari 16+, and Edge 79+ support auto, contain, and none. The newer chain value needs Chrome 150+, Firefox 157+, or Edge 150+, and Safari does not support it yet. It is a browser CSS property, not a Node.js feature.

Next: overscroll-behavior-x

Control overscroll on the physical horizontal axis for left and right edges.

overscroll-behavior-x tutorial →

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.

8 people found this page helpful