This is partially a copy of: Scroll part of content in fixed position container but with some more restrictions and the fact that question was never adequately answered anyway.
I have a fixed position sidebar that is 100% height (I suppose it could be absolute position with top 0 bottom 0)
There are a number of elements that take up the first part of the sidebar and then tabs for user content (essentially and area where users can save links to). The elements in the first part of the sidebar can be added and removed so the vertical starting position of the user content is variable. The user content itself could contain any number of links within the tab content and as such the tab content could take up more height than the rest of the sidebar. When it does this I would like a scrollbar to appear in the tab content area to scroll through all the links.
A demo page can be seen here: http://protobrewui.meteor.com/
A very close analogy is the same thing that Google does in gmail as shown in the image below.
Google may do it with javascript or pure css. A pure CSS solution would be preferable but javascript is a valid option for me too.
Some more info:
- I don't want the whole sidebar to scroll, only the tab content if it overflows the page
- If I have to not have variable elements above the tab content I may be able to live with that.
- the tab content should be able to take up the whatever height remains in the browser window before scrolling so giving the tab content a fixed height isn't quite what im looking for