What is the overflow property in CSS?

​The CSS overflow property specifies what should happen if the content inside a container cannot fit completely​ inside it. It can take four different values:

  1. Visible: Displays the overflowing content without any modifications – this is the default value of the overflow property.

  2. Hidden: Hides the overflowing content.

  3. Scroll: Adds vertical and horizontal scroll bars to see the overflowing (hidden) content. On some web browsers, a disabled scroll bar will be displayed if the content does not overflow.

  4. Auto: Adds scroll bars, but only if the content overflows.

svg viewer
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved