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
Also Read: Bootstrap Interview Questions and Answers
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 */
}