SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to stop javascript dropdown menu from scrolling?

    Hi,

    I'm trying to place a javascript pulldown menu in a layer at the top of my page.

    Everything seemed to work great until I noticed the menu always stays visible as you scroll down the page.

    How can I make this menu stay put exactly in the layer (yellow bar) and not scrolldown?

    Thank you very much for any assistance you can offer.

    You can see the page here:
    http://www.tigerforums.com/example.htm

    You can see the javascript here:
    http://www.tigerforums.com/javascript.txt

  2. #2
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using div layers and direct pixel counts, I don't think it's possible. I may be wrong. If you place the menu as solid HTML table, it should stay though.

    Very impressive though.

  3. #3
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's an HVmenu from www.dynamicdrive.com. Did you notice this?
    Menu can be vertically static
    Somewhere in the documentation (I'm guessing) is the information on how to enable/disable this feature.

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adios
    That's an HVmenu from www.dynamicdrive.com. Did you notice this?
    Somewhere in the documentation (I'm guessing) is the information on how to enable/disable this feature.
    It came with two scripts. The one that runs it and a configuration script.

    In the configuration script is has this option:
    Code:
    var MenuVerticalCentered='static'; // Menu vertical position 'top', 'middle','bottom' or static
    I've got it set to "static" but that doesn't seem to have any effect. It still scrolls witht he page.

    There has to be a way to make this menu stay in one place. It's a great script, it seems to load fast and I'm dying to get it up on my forum.

  5. #5
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe 'static' means it doesn't scroll with the page, and it isn't. It's staying put (think about it). Why not try the other options?

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can see your point. It could really mean two different things but obviously it means what you describe.

    I've tried the other options but they either put it at the very top, the middle or the very bottom.

    Is there a common JS function that tells the script where to stay? This really doesn't seem like it should be that difficult to correct. (then again, I'm no JavaScript guru either)


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
  •