0

I have a scrollable container and want to limit the horizontal scrollbar to a certain width. It should look like that. The scrollbar should not take all of the remaining space of the div. only the allocated one. enter image description here

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
  -webkit-border-radius: 10px;
  border-radius: 10px;
  max-width: 200px;
}

 ::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 0px rgba(0, 0, 0, 0);
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

 ::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #c51694;
  height: 3px;
  max-width: 5px;
}

 ::-webkit-scrollbar-corner {
  display: none;
  height: 0px;
  width: 0px;
}
Rana
  • 2,500
  • 2
  • 7
  • 28
Xkoder FX
  • 31
  • 8

0 Answers0