I have been struggling to understand this scenario
I have set, in CSS
html, body {
min-height: 100%;
}
So that when there is no content on the page, the html and body take 100% of the height of page. And if there is content in body, these should change their height according to content height.
But when I add some content on the page (enough to display scroll bar), html and body are not taking 100% height of the document. i.e. if my screen height is 700px, in either case $('body').height()
would return 700px;
Why is that?
EDIT: In other words, I want my body Tag to be at least 100% of screen but it should grow if content is added.
tags, the height is then 0. I want the height to be as big as viewport
– U.P Jun 02 '13 at 12:05