First, I think that you have a layout positioning issue and that's why the scrollbars get messed up. Without knowing anything about the intrinsics of the scrollbar plugin or without even reverse engineering the scrollbar plugin, I'd cast my votes for the layout issues you have.
The issue is that if you position the .test
div absolute inside another div with an absolute position without any dimension specified (height and width) you can't expect .test
div to work with percentages because its parent element (.overview
) is positioned absolute as well with no dimensions specified. So, I really think it's worth to remember what an absolute position means. Quote from W3Schools...
An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is the html element
so, currently, if you set .test
to absolute position its width will be 0 (zero) while .overview
(its parent) has zero width and zero height. Understood? Zero height and zero width...which means there is no content vertically overflowing and therefore, the scrollbar plugin understands there's no need to display vertical scrollbars...because there is NO content vertically overflowing.
I hope it makes sense