DEV Community

loading...

CSS: Hide scrollbar

Mehul Lakhanpal
Full stack Developer | Micro-blogging on Web Development at codedrops.tech | Creator of File Ops, Note Box, GitHub Marker
Originally published at codedrops.tech ・1 min read

Hide the scrollbar using <element-selector>::-webkit-scrollbar

<style>
  .content {
    height: 300px;
    width: 300px;
    overflow: auto;
  }
  .content::-webkit-scrollbar {
    display: none;
  }
</style>

<div className="content">
  content...
</div>
Enter fullscreen mode Exit fullscreen mode

Alt Text

Discussion (0)