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

Property of overflow is given below :-

  • visible
  • hidden
  • auto
  • scroll
BY Best Interview Question ON 24 Aug 2019

Example

overflow: scroll
div {
overflow: scroll;
}

overflow-x and overflow-y
div {
overflow-x: hidden; /* Hide horizontal scrollbar */
overflow-y: scroll; /* Add vertical scrollbar */
}