Attempting to create a scrollbar within my content div instead of the entire window seems to be causing a large white space in the content box, and I'm struggling to understand why. Can someone take a look and help me identify the issue?
You can view my site here: www.rajohan.no/index.php?page=movie&category=comming
Another problem I'm facing is that the scrollbar extends under the footer. Is there any way to make it stop at the beginning of the footer?
I am using overflow: hidden; on the body and then overflow-y: auto; in my content div
Below is my jQuery script to determine if a scrollbar is necessary:
// Check if content_box needs a scrollbar
function calculateDivHeight() {
$("#content_box").height(window.innerHeight);
}
$(window).resize(function () {
calculateDivHeight();
});