SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Apr 2000
    Location
    Winchester, Hampshire, England
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I'm using the nav bar from here... http://dynamicdrive.com/dynamicindex1/topnavbar.htm

    I have made it so that the options pop upwards rather than drop down as I want it to go at the bottom rather than the top of the screen.

    I have seen similar menus that automatically move so that they remain at the top of the visable screen when the user scrolls down.(Can't remember where though)

    What I want to know is - is it possible to have the nav bar I am using always set to the bottom of the visable screen whatever the resolution the viewer is using.

    I'm sorry if that all sounds a bit garbled.

    Hope you can help.

    Peter

    (I've also asked this question at the DynamicDrive Forum - hope this doesn't count as cross posting)

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you go to the Script Author's Home page at The Brainjar, you will find that he has a pretty good tutorial and will tell you how to accomplish what you want.

    ------------------
    Wayne Luke - Sitepoint Moderator/Internet Media Developer
    Digital Magician Studios - Making Magic with Web Applications
    wluke@digitalmagician.com

  3. #3
    SitePoint Addict
    Join Date
    Apr 2000
    Location
    Winchester, Hampshire, England
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks!

    As always a rapid reply.

    Peter

  4. #4
    SitePoint Addict
    Join Date
    Apr 2000
    Location
    Winchester, Hampshire, England
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmph!

    I've been playing with the script for a few hours now and still can't get it to do what I want.

    I THINK that if I get the height of the window from getWIndowHeight() and then subtract the height of the nav bar I'll get the y coordinate I need to moveTo: the nav bar. But it just doesn't seem to be that simple. I can't find the initial coordinates for the nav bar for a start, though I know they are set to (0,0).

    I've found how to move the bar to a location defined by an image I place on the screen. But I still need to find a way of placing the image at the bottom of the screen whatever the visable size. Also while I've been playing I've made the bar arrive ALMOST at the position I want but when I scroll it doesn't move the same amount as the screen.

    I'm very confused (and stupid?).

    Help me someone!!!!

    Peter

    P.S. I'm trying to modify the script on from this example page http://www.brainjar.com/dhtml/navbar/static.html

    If you can find the height of the screen how hard can it be to position the bar relative to that height - for me - very difficult.

  5. #5
    SitePoint Addict
    Join Date
    Apr 2000
    Location
    Winchester, Hampshire, England
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DONE IT

    It was simply...

    myNavBar.moveBy(0,getWindowHeight()-myNavBar.height);

    I have a splitting headache and a great sense of satisfaction. Thanks for setting me in the right direction.

    Peter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •