I have been struggling to make my div fit the body's height and always stay at the bottom when I scroll. Initially, I set it to 100% height but soon realized that this is not the correct solution. While scrolling, I noticed a gap between the bottom of my div and another element disappearing from view.
To address this issue, I attempted to use a jQuery snippet:
$(window).resize(function(){
var pageHeight = $(document).height();
$('#menu').css('height', 'px');
$('#menu').css('height', pageHeight + 'px');
});
Unfortunately, this approach did not work as expected, leaving me unsure of what steps to take next.