Back to all resources
CSS
scrollbar

Hide scrollbars

By Jared Malan
This CSS code defines a class named .no-scrollbar that hides the scrollbar across different web browsers. The -ms-overflow-style: none; property is used to hide the scrollbar in Internet Explorer 10 and later versions. The scrollbar-width: none; property is used to hide the scrollbar in Firefox. Additionally, the .no-scrollbar::-webkit-scrollbar selector is used to hide the scrollbar in Chrome, Safari, and other browsers that use the WebKit engine by setting the display property to none.