what is the name of this feature as used on webpages/sites?

0 votes
a floating text box that always stays on the page as you scroll down like you see on good webpages, and very good sites

like how in excel you can 'freeze pane' -- those pane will always be on the screen. excel's way is very limited
asked Nov 27, 2012 by anonymous
retagged Nov 27, 2012 by

2 Answers

+2 votes
I don't think there is really a proper name for the feature. What is currently being done is the use of JavaScript to detect a page scroll and then take a relatively positioned element and fix it to a certain area of the page.  You can also just use a normal fixed position as well if you always want it in the same place.

There is a new feature in development stages that is position sticky. [1]  It is currently only in webkit to my knowledge but is something worth looking forward to for easily getting this function.

[1] http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit
answered Nov 27, 2012 by (2,640 points)
+1 vote
It’s called fixed positioning. You can instantly start using it so long as your browser versioning is not required to be IE 6:
position: fixed;

There are methods to do this dynamically via javascript, in fact there are a large amount of tutorials online that show you how to do this only after a certain number of pixels have been scrolled. A great example of good usage is how Bootstrap implements it in their documentation:
http://twitter.github.com/bootstrap/ (the primary header of the page)
http://twitter.github.com/bootstrap/scaffolding.html (scroll down to see sidebar stick)

Resources:
http://www.w3schools.com/cssref/pr_class_position.asp
http://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed
answered Dec 8, 2012 by (380 points)