to remove horizontal scrollbar css code example

Example 1: css how to remove horizontal scrollbar

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

Example 2: 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 3: remove horizontal scrollbar css

overflow-x: hidden;

Example 4: how to remove horizontal scrolling

/* this works for vertical scrolling also

this is useful for those who can't use overflow: hidden or any other solution
because the css on the website changes in someway */

::-webkit-scrollbar:horizontal {
  display: none;
}