Have a look at position:fixed and position: sticky.
https://developer.mozilla.org/en-US/doc ... S/positionposition:fixed should have broader browser support and is probably easier to implement. position:sticky took me a while to get my head around - it's relative to where the element is on the page (I think, my brain exploded). If you target IE11, you definitely can't use sticky.
So for fixed try something like this (gross colours so you can see what's going on):
p.fixed {
position: fixed;
bottom: 1px;
right:10px;
background-color: white;
border: 1px solid limegreen;
}
For sticky, something like this assuming your element is at the bottom of the page, not the top:
p.sticky {
position: -webkit-sticky;
position: sticky;
bottom: 1px;
left:90%;
border: 1px solid lightpink;
background-color: white;
width: 10em;
}