I am trying to fix a div so it always sticks to the top of the screen, using:
div
position: fixed; top: 0px; right: 0px;
However,
You can give a try to my jQuery plugin, FixTo.
Usage:
$('#mydiv').fixTo('#centeredContainer');