If body is smaller than viewport, then the viewport size is returned.
What I am trying to do is resize a picture so that the body fits inside the viewport. I want to have one of those nice "above the fold" layouts where the user does not need to scroll. It breaks though when the screen is so large that the body is smaller than the viewport.
If body < viewport
document.body.scrollHeight (body) =
The jQuery solution is to use
$(document).height(), but it gives the larger of the viewport or the document.
How do I find the body height where the body height is less than the viewport height?