I previously asked the following question on stack overflow: create a scroll bar in a sidebar
here basically I am trying to create a sidebar. And in that sidebar, I want a header of unknown size and a footer of unknown size. And between the footer and header of the sidebar, I want a scrolling div containing a a long list of things. In the question above I was asking how to use css to make the scrolling div fill the space between the header and footer.
I got a lot of answers saying things like: "How can a selector know the height of another element? It is not what CSS are for."
Now my question is, why can't you do this is css? Why doesn't css allow you to set two divs to take up as much space as they need, and the div in-between fill the rest of the space? Is this not a common problem that needs to be solved?