Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. CSS Course

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;
}
Previous: Floating & ClearingNext: Visibility & Opacity