Lesson 13 of 50 · css
Overflow & Scrollbars
Duration: 6 mins
Controls what happens when content exceeds an element’s box.
overflow:visible– default, content spills out.overflow:hidden– clips overflow, useful for UI tricks.overflow:auto– adds scrollbars only when needed.overflow-x/overflow-y– control each axis independently.
Example: Horizontal scroll gallery
.gallery {
display:flex; overflow-x:auto; gap:1rem; padding:1rem;
}