How to make a div to always appear at the top of a web page even when the paged is scrolled vertically.
Use CSS position: fixed;:
position: fixed;
#topdiv { position: fixed; top: 0; }
See jsFiddle example: http://jsfiddle.net/CXACT/1/