CSS Overflow

What is CSS Overflow?

CSS Overflow The overflow property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area.. The overflow property has the following values:. visible – Default. The overflow is not clipped. The content renders outside the element’s box; hidden – The overflow is clipped, and the rest of the content will be invisible

div {
  width: 200px;
  height: 50px;
  background-color: #eee;
  overflow: visible;
}

The overflow property has the following values:

  • visible – Default. The overflow is not clipped. The content renders outside the element’s box
  • hidden – The overflow is clipped, and the rest of the content will be invisible
  • scroll – The overflow is clipped, and a scrollbar is added to see the rest of the content
  • auto – Similar to scroll, but it adds scrollbars only when necessary