Normally a scrollbar is positioned like this:
________________________________________
| | |
| content | scrollbar |
| | |
| | |
| | |
| | |
|__________________________|___________|
I'm basically looking to have a gap between a "custom" scrollbar and the outer boundary of a scrollable container:
________________________________________
| | | |
| content | scrollbar | gap |
| | < | |
| | | |
| | | |
| | | |
|____________________|___________|_____|
Using a margin-right
on either ::-webkit-scrollbar
or ::-webkit-scrollbar-track-piece
fails and the announcement of the style–able scrollbars for Webkit states:
Margins are supported along the axis of the scrollbar. They can be negative (so that the track can for example be inflated to cover the buttons partially).
I'm now wondering if anyone has managed to push the scrollbars "into" the content (or out of the wrapper for that matter) by some other means than margin
.
I'm assuming that this might be possible only (if even) using some kind of trick — any ideas?
Other things I've tried unsuccessfully are padding-right: 10px
and border-right: 10px solid rgba(255, 255, 255, 0)
(a transparent border).