How to make a div always appear at the bottom of the page and stay there even after scrolling?

Almost everything is in the subject, I need to use javascript to achieve this, maybe css will work well? I also need this solution to work fine with IE6.

If javascript is just a solution, then how to animate a div to change position smoothly?

Thanks for the help for the help.

+3
source share
2 answers

Like this:

<div style="position: fixed;bottom: 0px;right:0px;">
    This would be on the buttom of the page regardless to scroll.
</div>
+1
source

You can use calc () inside CSS to snap it to the bottom of your page.

Check out the CSS Hacks article explaining some of the uses for calc ().

0
source

Source: https://habr.com/ru/post/1738786/


All Articles