scrollbar doesnt hide when not scrolling custom css code example
Example 1: css hide scrollbar but allow scroll
html {
overflow: scroll;
}
::-webkit-scrollbar {
width: 0px;
background: transparent; /* make scrollbar transparent */
}
Example 2: hide the scrollbar in css if not overflow
.myClass {
/*auto will remove and add the scroll bar as needed*/
overflow: auto;
}