Create menu following scroll float effect on web pages

Asked By 10 points N/A Posted on -
qa-featured

Hi, I'm into web designing and i want to make a menu which follows as you scroll down on webpages. Is there a way you could create menu following scroll?

SHARE
Answered By 15 points N/A #169956

Create menu following scroll float effect on web pages

qa-featured

 

Hi,
 
Well, if you are planning to create a fixed menu on a webpage which follows the user even though scrolling the page, then a simple CSS code will work that trick. The code that will do the trick is a simple “position:fixed” line in your codes. Here is a link for an example:
 
 
The floating menu used in that site there utilized this code:
 
<style>
div.floating-menu {position:fixed;background:#fff4c8;border:1px solid #ffcc00;width:150px;z-index:100;}
div.floating-menu a, div.floating-menu h3 {display:block;margin:0 0.5em;}
</style>
<div class="floating-menu">
<h3>Floating Menu</h3>
<a href="http://www.quackit.com/css/">CSS</a>
<a href="http://www.quackit.com/html/">HTML</a>
<a href="http://www.quackit.com/javascript/">JavaScript</a>
<a href="http://www.quackit.com/coldfusion/">ColdFusion</a>
<a href="http://www.quackit.com/myspace/codes/">MySpace Codes</a>
</div>
 
I hope this helps!

Related Questions