The overflow property specifies whether to clip content or add scrollbars when an element's content is too big to fit in a specified area.
The overflow is not clipped. It renders outside the element's box.
div { overflow: visible; }
The overflow is clipped and becomes invisible.
div { overflow: hidden; }
The overflow is clipped, and a scrollbar is added (both horizontally and vertically) to see the rest of the content.
div { overflow: scroll; }
Similar to scroll, but it adds scrollbars only when necessary.
div { overflow: auto; }
You can control the overflow for specific directions (horizontal vs vertical) separately.
div {
overflow-x: hidden; /* Hide horizontal scroll */
overflow-y: scroll; /* Force vertical scroll */
}
overflow: hidden on parent containers to automatically clear floated child elements (the clearfix hack).