Answers for "css hide scrollbar if not needed"

CSS
36

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 */
}
Posted by: Guest on July-01-2020
53

hide scrollbar css

/* A very quick an applicable solution is to use this piece of code: */
html {
overflow: scroll;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 0px; /* remove scrollbar space /
background: transparent; / optional: just make scrollbar invisible /
}
/ optional: show position indicator in red */
::-webkit-scrollbar-thumb {
background: #FF0000;
}
Posted by: Guest on February-18-2021
1

hide scrollbar css

.container {
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
}
.container::-webkit-scrollbar { /* WebKit */
    width: 0;
    height: 0;
}
Posted by: Guest on July-25-2021
0

hide the scrollbar in css if not overflow

.myClass {
  /*auto will remove and add the scroll bar as needed*/
  overflow: auto;
}
Posted by: Guest on September-30-2020
0

hide scroll bar when not needed

overflow: auto;
Posted by: Guest on November-12-2020

Code answers related to "css hide scrollbar if not needed"

Browse Popular Code Answers by Language