I made a centered page container that has 100% height with a footer inside it. My problem is that when I put in an element that is too tall or text that is too long, they will flow out of the “#page” container and over the footer. Using overflow-y: auto; on “#page” container doesn’t look good. I would prefer the “#page” container to stretch to accommodate longer elements or text but still have the “#page” container’s height to be the same as the browser window height. An aesthetically pleasing solution would be appreciated thanks.
UPDATE:
here is the jsfiddle link http://jsfiddle.net/ueP9q/
HTML
CSS
See this one – http://jsfiddle.net/aniketpant/U5CSv/
Just removed the 2 margins you had put.