Sometimes, we want to hide the scroll bar on an HTML page with CSS.
In this article, we’ll look at how to hide the scroll bar on an HTML page with CSS.
How to hide the scroll bar on an HTML page with CSS?
To hide the scroll bar on an HTML page with CSS, we select the scrollbar and hide it.
For instance, we write
#element::-webkit-scrollbar {
display: none;
}
to select the scrollbar for the element with ID element with #element::-webkit-scrollbar
.
Then we hide it with display: none;
.
Conclusion
To hide the scroll bar on an HTML page with CSS, we select the scrollbar and hide it.