I am currently working on designing a webpage layout with multiple headers, main content, and a footer.
My goal is to use the jQuery UI tabs widget in the main content area with a border around it. The div should span the entire space between the headers and footer, while also expanding vertically if necessary, causing a scrollbar to appear for scrolling.
The minimum height of the content div should be the distance between the header and footer, but it should have the ability to expand beyond that initial size.
I have attempted to implement the Sticky Footer method, which works well except that I want a border around my main content. In the provided jsFiddle example, the div with the red 2px border should initially fill the page and expand when additional content is added so that the footer is pushed down accordingly and a scrollbar appears.
This is my desired outcome:
- The content must have a border.
- The initial content should fill the space between the header and footer.
- The content should expand past the bottom of the screen, triggering a scrollbar.
- The footer should adjust as the content grows.
- Strictly CSS is preferred so that any changes in content are automatically adjusted.
- Solution should work in modern browsers only, without support for IE<8.
I have explored options such as absolute positioning, jQuery positioning, setting heights using CSS properties, and reviewing similar Stack Overflow questions, but none fully address the issue of content growing beyond the bottom of the screen efficiently.