Junior JavaScript

What is overflow in CSS?

Controls what happens when content exceeds the container’s size.

Values:

  • visible (default)
  • hidden
  • scroll
  • auto

Example:

div { overflow: auto; }

Key Takeaway:

overflow: auto adds scrollbars only when needed.

More from JavaScript Tutorial

All questions for this course