Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Top Floating Navigation

    I'm trying to create a vertical navigation bar, but I want it to float in an unusual way.
    I want the navigation to be under the banner, but to scroll to the top of the screen when the content is scrolled.
    Confused? Here's an example:
    http://finance.yahoo.com/tech-ticker
    I want to create a div for my nav bar that behaves the same way as the video/ad box on the left side of the page.
    Any help would be greatly appreciated!
    Thanks in advance

    - Toby

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    The basic behavior of the Yahoo example is "position: fixed" in the CSS. But the way it only becomes "fixed" once it's moved to the top is controlled by Javascript.

    A CSS-only version would be interesting, though.

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Unhappy

    Yea, I tried playing around with their css on a site of my own, and I realized there had to be more to it than just the css.
    I tried to pick the site apart, but I can't figure out which of the javascripts is creating that effect. Anyone know where the controlling script is?

    Thanks!

  • #4
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    You may find this site of interest,

    And also much more here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #5
    New Coder
    Join Date
    Jan 2008
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Cool

    Thanks effpeetee!
    The second site you sent me (bonrouge) didn't have what I needed, but actually led me to dynamic drive where I found this:

    http://www.dynamicdrive.com/dynamici...lide/index.htm

    The menu on the left is just what I needed, I just have to strip it and tweak it for my site.

    Thanks again!


  •  

    Tags for this Thread

    Posting Permissions

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