I would like to position a div withing another element but make it stay in place when a page is scrolled vertically. The parent element is longer then the screen height. Can that be done with just CSS or do I need to use jQuery (that’s what i normally use)? I’d use fixed position but am not sure how to associate it relative to the parent div…
<div id="veryHighDiv">
<div id="positionMe"></div>
</div>
So, I need it to be position relative to the parent in term of horizontal position, but “fixed” when it comes to vertical scroll.
Quite simple with jQuery – http://jsfiddle.net/zA3mq/