User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,462 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,620 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 3528 | Replies: 2
Reply
Join Date: Nov 2006
Posts: 6
Reputation: jcisml is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jcisml jcisml is offline Offline
Newbie Poster

how to create floating menu

  #1  
Nov 5th, 2006
Hi, i'm trying to make a menu that will follow me as I scroll down the window,
somethins like this, (look on the right and on the left)
please use IE to see, firefox doesn't display properly

http://www.gmarket.co.kr/challenge/n...link_type=LIST

i have found some java script, however I want the menu move smoothly as i scroll, any help is appreciated
Last edited by jcisml : Nov 5th, 2006 at 12:42 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: how to create floating menu

  #2  
Nov 5th, 2006
Research the JavaScript "scrollto" functions. I've moved this thread to the proper forum.
Reply With Quote  
Join Date: Sep 2005
Posts: 689
Reputation: digital-ether has a spectacular aura about digital-ether has a spectacular aura about 
Rep Power: 6
Solved Threads: 41
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Re: how to create floating menu

  #3  
Nov 6th, 2006
FF allows the style "position:fixed;". That will fix the element in a certain position relative to the screen.
You can emulate it with IE and other browsers by creating a DIV as the first child of the body to emulate the body.
Remove all padding, spacing, borders from the BODY and also set "scroll:none;overflow:hidden;" in CSS and in javascript disable the scroll.
Then give your DIV thats emulating the body a overflow:auto;.

Then when you want to make a DIV fixed, just place it outside the DIV that you are using as the BODY, and make it absolutely positioned.

See an example: http://tagsoup.com/cookbook/css/fixed/

This is better to moving the Element when onscroll is triggered.

If you want to go with onscroll event, then don't jump directly to the scroll offset, use an incremental approach...

pseudo code:
while (body_scroll_offset > absolute_div_position) { absolute_div_position++ }
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC