Answers for "css only have scroll bar if theres overflow"

CSS
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;
}
Posted by: Guest on April-18-2021
0

show scroll only when overflow

overflow: auto;
Posted by: Guest on May-11-2020

Browse Popular Code Answers by Language