hide scrollbar in div but still scroll 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 scroll bar when not needed
overflow: auto;
Example 3: how to hide scrollbar css
body {
overflow-y: hidden; /* Hide vertical scrollbar */
overflow-x: hidden; /* Hide horizontal scrollbar */
}