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;
:
#topdiv {
position: fixed;
top: 0;
}
See jsFiddle example: http://jsfiddle.net/CXACT/1/
div#myDiv {position: fixed; top: 0px; ...}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With