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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    10
    Thanks
    4
    Thanked 0 Times in 0 Posts

    menu system that automatically scrolls down the page

    Hi,

    Can anyone help me achieve this effect seen in the example provided,
    http://www.barrelny.com/24/

    I want to create this technique of having a fixed menu at the top and when you click one of the options in the navigation menu it automatically scrolls to the chosen area of the page.

    Its the scrolling technique i am after the most!

    Thank you.

  • #2
    New Coder
    Join Date
    Jun 2012
    Location
    Burnley, Lancashire UK
    Posts
    12
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Hi joelbrandman,

    For this effect you need to use an anchor then reference that anchor in your link.

    so for example on about.html

    <body>

    <a name="aboutme">About Me</a>
    This is about me.

    </body>

    And your menu link will look something like this

    www.yoursite.com/about.html#aboutme
    Last edited by JT Web Design; 01-02-2013 at 07:49 PM.

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,739
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    Hello joelbrandman,
    That page you link to uses <a href="#meetbarc"> in the menu to scroll down to <a class="anchorlink" name="meetbarc"> </a>

    Would use an id instead of name. Like this - <a class="anchorlink" id="meetbarc"> </a>

    That page also uses a bit of js for a scrolling transition, a page anchor would just jump to the spot linked further down the page without it. See a jQuery ScrollTo here. I did not look to see what scrolling js is actually used on that page...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    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
    •