Solved

Element follow when scrolling

Posted on 2008-09-29
1
1,446 Views
Last Modified: 2013-11-19
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?
0
Comment
Question by:mgmweb
1 Comment
 
LVL 16

Accepted Solution

by:
anoyes earned 125 total points
ID: 22602959
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:

position:fixed;
top:0;
left:0;
right:0;
height:20px;

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.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now