`::-webkit-scrollbar{
width: 12px;
}
body::-webkit-scrollbar-track{
background: #f1e9e9;
border-radius: 10px;
margin-block: 0.1875rem;
}
::-webkit-scrollbar-thumb{
background-color: #582965;
border-radius: 10px;
border: 3px solid #ffffff;
}
::-webkit-scrollbar-thumb:hover{
background-color: #40144d;
}
::-webkit-scrollbar-track:horizontal{
display: none;
}`
I made this code for a scrollbar in css and the scrollbar works perfectly, but for some reason that I don’t know there is a small white square just below the scrollbar.
Here is a link to the entire project in case anyone thinks the problem may be resulting from elsewhere in the code.
I can’t think of anything i haven’t tried to solve this.
2
Answers
That’s because you have "overflow:scroll" for both axis – horizontal and vertical, this little white square is their interception.
Replace with
thus, no need for
According to the W3 doc:
The MDN web docs about the overflow-y:
The Overflow Property (where you can see the same issue you’re having) compared to The overflow-y Property. In your case, just set a line like this:
The following snippet shows this property in action: