Sometimes we need a label/div or any control to be shown to users no matter they are scrolling up and down the page. "Follow us on Twitter" is very much common these days which uses a fixed position dive and no matter a user scroll down or up the Follow us link will be shown.
How to do this?
Okay here is the solution. In following I have given a simple code which will show a DIV at the top left of the window regardless of the scrolling. You can adjust left and top for your required position of DIV.
<div style="position: fixed; left: 0px; top: 0px;">
Fixed DIV
</div>
No comments:
Post a Comment