?
Solved

Element follow when scrolling

Posted on 2008-09-29
1
Medium Priority
?
1,464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
anoyes earned 375 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

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