css show scrollbar only when overflow code example
Example 1: css show scrollbar if overflow
/*You can automatically show a scrollbar IF there is overflow with this: */
body {
overflow:auto;
}
/*If you want to always show a scrollbar, use this: */
body {
overflow:scroll;
}
Example 2: show scroll only when overflow
overflow: auto;
Example 3: hide scroll bar when not needed
overflow: auto;