How do I make a DIV always float on the screen's top right corner, so that even when I scroll the page down, the DIV still shows up in the same fixed location? Thanks.
Use position: fixed, and anchor it to the top and right sides of the page:
position: fixed
top
right
#fixed-div { position: fixed; top: 1em; right: 1em; }
IE6 does not support position: fixed, however. If you need this functionality in IE6, this purely-CSS solution seems to do the trick. You'll need a wrapper <div> to contain some of the styles for it to work, as seen in the stylesheet.
<div>
1.4m articles
1.4m replys
5 comments
57.0k users