How to make scroll bars with the help of CSS?

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



overflow: scroll
div {
overflow: scroll;

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

Suggest An Answer

No suggestions avaliable!

Related Interview Questions