Working on a website, I decided to make the sidebar fixed on the left and set it to extend to the full height of the page with the following CSS:
sidebar {
position: fixed;
top: 0;
bottom: 0;
}
While this keeps the sidebar in place, there is an issue when the page is resized to a smaller height. Only the content at the top of the sidebar is visible, making it impossible to see anything at the bottom.
I am aware that adding overflow-y: scroll;
will create a scrollbar, but I am looking to implement a dynamic scrollbar that only appears when the sidebar content exceeds the window height and only appears upon hovering. I also want the scrollbar to have a style similar to the sidebars on websites like TheNextWeb or Facebook chat.
Realizing I will need javascript for this functionality, I must admit my javascript skills are limited. Any assistance would be greatly appreciated.