In simple words, what does overflow mean in CSS?

In simple words, what does overflow mean in CSS?

Simple example: If you define a container in a page that’s 100x100 pixels and try to put an image in it that is 200x200 pixels, it wouldn’t fit. overflow would let you decide what happens to the extra part of the image.

4 Likes

What options would the overflow give for the extra parts?

Some common ones are:

  1. Visible: the extra content is zsimply shown on the page

  2. Hidden: the extra content is not displayed

  3. Scroll: the extra content is not displayed on the regular webpage, but you can scroll within its parent element to see it.

Though the best way to learn about a part of a language is the documentation.
For HTML, CSS, and JavaScript, MDN webdocs is a good place to look:

Overflow

1 Like