Skip to main content
D
CSS
CSS Overflow

CSS Overflow

CSS overflow handles content that spills out of its container.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

CSS controls what happens when a box contains too much text or media. By default, content visibly spills out. Developers can hide this extra content or add scrollbars to keep the layout neat.

Example

Example
1/* this adds a scrollbar */
2div {
3  width: 200px;
4  height: 100px;
5  overflow: scroll;
6}

Key Points

  • The `visible` value shows content outside the box.
  • The `hidden` value clips overflowing content completely.
  • The `scroll` value adds permanent scrollbars.
  • The `auto` value adds scrollbars only when needed.

Up Next

Continue your journey with the next topic.

Go to CSS Float