Keep div in position after scrolling user page

#div1 { background: #ffffff; padding: 6px; color:#333; font:normal 10px Arial, Helvetica, sans-serif; text-decoration: none; text-transform: uppercase; position: absolute; bottom: 20px; right: 20px; } 

This div saves the 20x20 px position from the lower right corner of the page. But my site contains a pagination function with an endless page, and when the scroll bars appear in the browser window because the content is increasing, the div does not save its position in the lower right corner, but moves up the page. How can I make this div stay in the lower right corner even when the user scrolls or scrollbars appear? Thanks

+8
html css scroll positioning
source share
2 answers
 position: fixed; 

It should do it

+17
source share

I had a similar problem with calling an angular div. On the horizontal scroll, the call was left while everything else was moving. Making sure the div container has the following property:

 position: relative; 

helped in my case along with a similar code with yours.

0
source share

All Articles