My website has a sidebar with a lot of materials, so the browserโs viewing window must be at least 1,020 pixels tall in order to view everything without scrolling (unless, of course, you zoom out).
I want the position of the sidebar to be fixed, so that when you are on a page with a lot of content, the sidebar remains in the same position as you scroll. It was very easy to implement:
div#Sidebar { position: fixed; }
This works well on my computer as long as the browser maximizes because my monitor works with a resolution of 1920 x 1200. But if I resize the browser window, the sidebar will turn off. When I look at the contents of the page, I can see the entire contents of the page, but the sidebar remains cut off due to its fixed position. Therefore, it seems that I have only two options:
Make the sidebar position unfixed (bad), but give users the ability to see the entire sidebar (good).
Make the sidebar position fixed (good), but not allow users to see the entire sidebar (bad).
Is there a way to combine these two options?
Frank source share