I am facing an issue with a table that has three rows. I have a main #container div with a height of 100%, and inside it is a table with 3 rows. The first and last row contain fixed size content. However, in the second row, there is a #content div with a height of 100% and overflow:auto. (although the table has more rows and the page contains additional divs, for the purpose of this question, I have simplified it).
When the content in #content exceeds the space available, a vertical scrollbar should appear next to that div's content. Unfortunately, the vertical scrollbar appears at the browser window itself. Strangely, when I set a fixed size for the #content div, the vertical scrollbar does appear in the correct place.
I suspect I may be making a mistake or misunderstanding something :) Do you have any suggestions? Is there perhaps a jQuery/javascript solution available that can automatically adjust the size of that particular div when the page loads or the browser window is resized?
EDIT: To illustrate my problem better, I have created a small example:
In an ideal scenario, the entire table should always be visible within the browser window, without the need for a browser scrollbar other than within the #content div.