Search code examples
htmlcssscrollbar

Make scrollbar float over the page


I am rephrasing this post to make more sense: The background of my page has an image and I am trying to hide the track of the scrollbar. however, when I set the background color to transparent it leaves a White gap where the track used to be. this is because the scrollbar takes up space on the page and you cannot put anything under it. I set the position of the scrollbar to absolute but that Property does not apply to this element.


Solution

  • I cannot get this to work with the rebuild scrollbar, I might have to build one with js.

    EDIT:

    I was trying to do this again recently and found a solution if you set overflow-y: overlay; the scrollbar will overlay on-top of the content. this makes the scrollbar thumb appear to float over the page if the track is transparent.