I’m trying to lay out a web page like this:
|-----------------------|
| header (fixed) | <- no scroll bar
|-----------------------|
| body | |
| | |
| | | <- scroll bar
| | |
| | |
| | |
| | |
| ... continues ... | |
| ... so requires ... | |
| ... scroll bar ... | |
|---------------------|-|
In the old old days I’d have done this with a frameset. I don’t want to go that route for a few reasons (including it being deprecated).
In the not-as-old days I thought I’d done this using a height=100% table with two rows as the entire body of the page, and the overflow style set hidden/auto in different places to get the bottom row to have the scroll bar for the main page content. I’d be OK with this as a solution, but I can’t remember how to set it up right (I’m pretty sure it involves getting the right page elements set to position:relative or something, but I’ve been banging my head on the keyboard for two hours trying to get it to work so I give up).
I’ve read claims that anything you can do with frames/tables you can do with the right divs and css, so I’d really like to see someone show me that solution.
Also note: I only want the scroll bar to appear when needed based on the content (as per overflow:auto) not all the time (overflow:scroll).
Here is a fully working solution to your problem scrollable content under an absolute positioned header with no other scrollbar on the browser window.