Become a Skillthrive author!

Hide scrollbar but keep functionality

By Hunter Becton on October 31, 2022

/* Hide scrollbar for Chrome, Safari and Opera */
.slider::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.slider {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

Simply add the styles to the element that you need to hide the scrollbar. Useful for creating a CSS-only image slider.