The overflow-inlinemedia feature tests how the output device handles content that overflows the initial containing block along the inline axis (the direction text runs in a line—usually horizontal in English).
It does not create overflow and is not the same as the overflow property. On most screens in browsers, the matched value is scroll.
Standard-track.
Baseline widely available since September 2023. Not deprecated, experimental, or non-standard.
Only two values.
Unlike overflow-block, overflow-inline supports only none and scroll—no paged / optional-paged.
Syntax
CSS Syntax
syntax.css
@media (overflow-inline:none | scroll) { … }
Use it inside an @media rule to gate styles for scrollable vs non-scrollable inline overflow.
Values
Feature Values
Value
Description
Try it
scroll
Inline overflow can be reached by scrolling (typical screens)
Open a media query.@media (overflow-inline: scroll) asks the device about inline overflow.
Match = scroll. Most browser viewports report this.
Apply styles. Here the paragraph turns red only when the query matches.
No match. If the device were none, these rules would not apply.
Example 2 — Cue for Single-Line Overflow
Keep a long line unwrapped, then highlight it when inline scrolling is available.
CSS
<style>
p {
white-space: nowrap;
}
@media (overflow-inline: scroll) {
p {
color: #b91c1c;
}
}
</style>
<p>This long single line may overflow the viewport horizontally.</p>
Inline first.overflow-inline: scroll covers the text axis.
Block second.overflow-block: scroll covers the stacking axis.
AND them. Both must match for the rule to apply.
Typical screens. Most browser windows match both as scroll.
Edge Cases & Pitfalls
If the query surprises you, one of these is usually why.
capability
It does not create overflow
The feature only reports how overflow is handled. Wide content still needs width, nowrap, or a small viewport to overflow.
property
Not the same as element overflow
Clipping a box uses overflow / overflow-x. The media feature is about the device/viewport capability.
values
No paged for inline
paged and optional-paged belong to overflow-block only. Do not use them with overflow-inline.
axis
Inline follows writing mode
In vertical writing-mode, the inline axis is vertical. Think in logical axes, not always “horizontal.”
print
Screens usually match scroll
Expect scroll in everyday browsers. none is uncommon for interactive screens; treat it as a progressive enhancement branch.
Compatibility
Browser Support
overflow-inline is a browser CSS media feature for viewport overflow capability. Node.js, Deno, and Bun do not evaluate it.
✓ Baseline · Widely available since Sep 2023
overflow-inline
Supported in Chrome 113+, Firefox 66+, Safari 17+, Edge 113+, Opera 99+, Samsung Internet 23+. Not supported in Internet Explorer.
94%Global support
Google Chrome113+
Full support
Mozilla Firefox66+
Full support
Apple Safari17+
Full support
Microsoft Edge113+
Full support
Opera99+
Full support
Samsung Internet23+
Full support
Internet ExplorerNo
Not supported
overflow-inlineWidely supported
Bottom line: Safe for modern browsers. Keep a sensible default outside the query for older clients.
Remember
Key Takeaways
Role: media feature for how devices handle inline-axis overflow.
Values: only none and scroll.
Typical screens: match scroll.
Pitfall: it does not set element overflow—use the overflow property for that.
One line: use @media (overflow-inline: scroll) to tailor wide layouts when the device can scroll along the inline axis.
Frequently Asked Questions
It reports how the output device handles content that overflows the initial containing block along the inline axis (usually horizontal in English). It does not create overflow by itself.
Two keywords: none (inline overflow is not shown) and scroll (users can scroll to see inline overflow). Unlike overflow-block, there are no paged values.
The overflow property controls clipping or scrolling on one element. The overflow-inline media feature describes the device’s capability along the inline axis.
scroll. Typical browsers let you scroll when content is wider than the viewport.
overflow-inline is the inline axis (text direction). overflow-block is the block axis (usually vertical) and also supports optional-paged and paged.
Baseline widely available since September 2023: Chrome 113+, Firefox 66+, Safari 17+, Edge 113+. It is a browser CSS media feature, not a Node.js API.