My goal is to implement scroll bars for overflowed content within a single table on the page. Despite reading numerous posts on this topic and experimenting with various methods like setting height to 100% or using flex layout, I still can't seem to achieve the desired outcome.
The visualization provided should make it easier to understand. The blue squares indicate tables while the red/green ones represent divs.
https://i.sstatic.net/PY7PG.png
Whenever I assign a specific height value to ancestors of the table, the scrollbar works properly. However, the challenge lies in not knowing the exact height in advance.
For instance, the total height of the page depends on factors such as screen size and browser window dimensions.
My aim is to have the green div and its associated table expand to fill up all the remaining screen height. While this approach almost works, the final height exceeds the available screen space.
Additionally, applying 'height: 100%' to the table results in an overly long scroll bar that extends beyond the window's boundaries.
Here is a plunk showcasing the concept. Unfortunately, it doesn't function as intended. What am I overlooking?