Skip to content Skip to sidebar Skip to footer

Scroll Html Page Before It 'reaches' The Bottom

I have this chat thread What it does currently is when it gets to the bottom of the page it scrolls up so that it is always at the bottom of the page. The issue is that as you can

Solution 1:

Scrolling in JavaScript always scrolls up to the maximum possible value. In your case it is a size of the scrollable contents. All you need to do is applying additional empty space that it is rendered behind the form.

So from your code (where you show us no CSS) you can add to your :

ol { padding-bottom: 50px; }

where 50px is the height of your form.

Also if you always want to scroll to the max bottom you can just use end value like 999999 instead of calculating it. Browser will be smart enough to understand it

Solution 2:

Hi just add this css in your html page you will get output div#footer { margin-top: 10px; }

Post a Comment for "Scroll Html Page Before It 'reaches' The Bottom"