Before I explain what I'm trying to do, note that I have the good fortune of only having to target Webkit (meaning, I can use lots of neat CSS).
So, basically, I want to have a block with a flexible height, position fixed, maximum height being that of the available window height, with some elements at the top and bottom of the block that are always visible, and in the middle an area with overflow auto. Basically it'd look like this:
---------------------- | Top item | | | | | | stuff | | | | | | | | | Last item | | |------------ | | | | | ---------------------- ---------------------- | Top item | | |-----------| | | lots |^| | | of |_| | | stuff |_| | | | | | | | | | |-----------| | | Last item | | ----------------------
Can it be done with CSS? Or will I have to hack it with Javascript? I'd be willing to accept a little div-itis if that's what it takes to make this work—better div-itis than trying to account for every stupid little thing like reflow and window resize and all of that nonsense.
I'm prepared for the bad news that this isn't something CSS can do, but I've been pleasantly surprised by the magic some folks on SO can work before.