how to hide horizontal scrollbar in css code example

Example 1: hide scrollbar css

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

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

Example 2: hide horizontal scrollbar css

.x-scroll-disabled {
	overflow-x: hidden;
}

Example 3: css hide scrollbar

// Sass Mixing
@mixin hideScrollbar {
  &::-webkit-scrollbar {
    width: 0 !important
  }
  -ms-overflow-style: none;
  scrollbar-width: none;
}

Example 4: how to remove scrollbars using javscript

body {
  overflow-y: hidden; /* Hide vertical scrollbar */
  overflow-x: hidden; /* Hide horizontal scrollbar */
}