This should be simple but nothing working:
Question
How do you set the height of a webpage, say exactly 4000 pixels, so that scrollbars exist even when the page is blank?
Background
I am new to JavaScript / JQuery, but very experienced with similar technologies. I am trying to make some fancy scroll based page effects. To do this methodically, as a first step, I am looking to create a “really tall” page. From there I will hide / show the elements based on the scroll height with pseudo-code line by line:
function onScrollEvent() {
var height = scroll height
var sectionIndex = Math.floor(height / MAX_SECTION_HEIGHT);
for each item in my array of graphics
if item index != sectionIndex then item.fadeOut else item.fadeIn
}
As soon as I succeed, I will begin to create the effects that I want to see. The problem is that I cannot make the dumb page "very high".
Summary
height div , , , , . " ", ? , , (), 4000 , . , :
height = Math.min(height of contents, height of div style)