- Home
- /
- CSS Overflow
CSS Tutorial
Introduction
CSS Properties
CSS Designing
CSS Advance Topics
CSS FAQs
- Home
- /
- CSS Overflow
CSS Overflow
The overflow
property in CSS handles content that doesn’t fit inside an element’s defined dimensions. It helps manage whether content should be visible, hidden, or scrollable.
Overflow Visible
This is the default value. If content exceeds the container, it overflows visibly outside the box.
Overflow: Visible
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Distinctio esse dignissimos velit doloribus mollitia hic doloremque praesentium, illum adipisci harum labore voluptate nam earum commodi molestias tempora. Sit, sequi corporis.

Overflow Hidden
This value cuts off any content that doesn’t fit inside the box. The extra part is not shown.
Overflow: Hidden
This text will overflow and be hidden from view completely. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex veritatis quam enim, iste voluptas nisi! Numquam aliquid adipisci sit corporis molestiae! Quod assumenda reiciendis cumque in temporibus dolores sapiente error.

Overflow Scroll
This value adds scrollbars regardless of whether the content fits or not. It allows scrolling both vertically and horizontally.
Overflow: Scroll
This box has scrollbars even if the content is slightly overflowing. You can scroll to view it.

Overflow Auto
This value adds scrollbars only when needed — if the content overflows, scrollbars appear; otherwise, they don’t.
Overflow: Auto
This is some extra long text that will trigger scrollbars *only if* it overflows.