CSS overflow: clip, scroll, and style the scrollbar
Answer: When content extends beyond its parent, there are many options for handling it.
Scrollbar properties
Style the scrollbar to incorporate it into your site's design.
Use the scrollbar-width and scrollbar-color properties to style scrollbars.
To change the width of the scrollbar, use scrollbar-width.
auto is the default scrollbar width as provided by the platform.
scrollbar-color sets the color for the scrollbar's thumb and gutter.
Overflow options
You can scroll to add additional space.
The overflow properties will help control overflow in the box model.
You can clip the overflowing edges.
text-overflow will help with individual lines of text.
You can indicate the cut-off with an ellipsis.
See also
Claims
- id: C1 claim: When content extends beyond its parent, there are many options for handling it. source: S1 evidence: "When content extends beyond its parent, there are many options"
- id: C2 claim: You can style your scrollbar to incorporate it into your site's design. source: S1 evidence: "You can style your scrollbar to incorporate it into your site's design"
- id: C3 claim: Scrollbar width and scrollbar color style the scrollbar. source: S2 evidence: "Use the scrollbar-width and scrollbar-color properties to style scrollbars"
- id: C4 claim: Auto is the default scrollbar width provided by the platform. source: S2 evidence: "The default scrollbar width as provided by the platform"
Sources
- [S1] Overflow. web.dev. https://web.dev/learn/css/overflow . License: CC-BY-4.0. Accessed 2026-11-24.
- [S2] Scrollbar styling. Chrome for Developers. https://developer.chrome.com/docs/css-ui/scrollbar-styling . License: CC-BY-4.0. Accessed 2026-11-24.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Overflow; Chrome for Developers, Scrollbar styling. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: web.dev, Overflow; Chrome for Developers, Scrollbar styling. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC.
Cite this
iinventedlight. 2026. "CSS overflow: clip, scroll, and style the scrollbar." iinventedlight Library, iil:note:drc6g1t1, version of 2026-11-24. https://iinventedlight.com/library/notes/css-overflow/. License: CC-BY-4.0.
@misc{iil_note_drc6g1t1,
author = {{iinventedlight}},
title = {{CSS overflow: clip, scroll, and style the scrollbar}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/css-overflow/},
note = {Permanent ID iil:note:drc6g1t1. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- css-overflow.schema.json (schema; CC-BY-4.0)
- css-overflow.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/css-overflow.md.