In the case in question would be a sidebar, which from a certain height of scrolling the top, receives position: fixed, but as it continues scrolling it is hidden behind the footer of the site. How could I determine that this sidebar from a certain footer distance would stop? (The footer has about 490px).