CSS Overflow Property

aimtocode

CSS Overflow Property?

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 different values as follows:

  • 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

Example :


Result:

                			

The overflow Property

The overflow property specifies whether to clip content or to add scrollbars when an element's content is too big to fit in a specified area.

overflow: scroll:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

overflow: hidden:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

overflow: auto:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

overflow: visible (default):

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

aimtocode