Simply add "fixed" to the classes of the desired element.
<div class="fixed">FIXED</div> <div class="someClass fixed">FIXED</div>
Though it's a little rough when scrolling I hope it will do the job.
The way it works:
- By using an event listener ("onscroll") the script calls the function which aligns the elements absolutely but relative to the window borders
Some of the functions are copied from the Internet simply to avoid the annoying writing.