Element follow when scrolling

I am trying to find out if it is possible to make an element stick to the top of the page while scrolling.

Actually I know that it is possible, I found a great jQuery resource for this here http://kitchen.net-perspective.com/o...scroll-follow/.

This example is working as it should, but there is a nasty flicker everytime you scroll down. Is it possible to make the movement of the element smoother while scrolling? I dont want the flicker.

If this is possible can anyone show me an example? If it is not possible to accomplish in javascript/jQuery is it possible to do so in flash?
Who is Participating?
anoyesConnect With a Mentor Commented:
It's actually quite easy to do with CSS.  Just add the following attributes to the element you want to hover at the top of the page:


That will give a 20px high element that spans across the entire page, and will always stay at the top regardless of scroll position.  Also eliminates flickering.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.