How to use CSS absolute position inside a scrollable div element
try position: sticky
on the div that you want to make float. also beware the browser support is not that great for sticky https://caniuse.com/#feat=css-sticky
You must set position: relative;
on the parent div to get the child elements to move in relation to it.
The reality is, you can have the parent div set to any user-defined position, as long as the default static
position isn't being used.