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
Copyright ©2024 Educative, Inc. All rights reserved