Interview Question

What is overflow in CSS?

overflow controls clipping and scrolling when content exceeds a box.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

Overflow controls how content outside a box’s padding area is handled. • Visible allows overflow to paint outside the box. • Hidden clips overflow; scroll and auto establish scrolling behavior. • Some values establish a new formatting context.

💡 Simple Example

.code { overflow: auto; max-width: 100%; }

⚡ Quick Revision

overflow controls clipping and scrolling when content exceeds a box.