[resolved] Anchor name adds a slash (9 posts)

  1. Yukon Cornelius
    Posted 3 years ago #


    I am trying to do what should be some the most basic html, but it's not working for me. Here is my code:

    <a name="rocket"></a>
        <h3>The Title</h3>
        <p>some text</p>

    I want to use the anchor name to fly down the contact page to the correct section.

    When I use a link within the contact page like this:

    <a href="#rocket">click here</a>

    it works fine. But i want to come from another page and then fly down. So I am using this:

    <a href="http://mysite.com/contact#rocket">click here</a>

    but it seems to add a slash after contact and redirect to http://mysite.com/contact/#rocket, which means that it stays at the top of the contact page instead of flying down.

    Does anyone know why this is happening? If you could point me in the right direction, I'd be grateful.



  2. Andrew Bartel
    Posted 3 years ago #

    That should work fine, I even just checked one of my sites and it does add the slash but still "flies down". Can we see the site where it's not working?

  3. Yukon Cornelius
    Posted 3 years ago #

    Thanks for taking a look Andrew, here's the url:


  4. Andrew Bartel
    Posted 3 years ago #

    Ah, I misunderstood, yes that last slash would cause it not to honor the anchor. I thought you meant the one in between contact and #. How/where is that link being generated?

  5. Borko
    Posted 3 years ago #

    It works but only without the slash at the end

  6. Yukon Cornelius
    Posted 3 years ago #

    hahahaha you hit the nail on the head.

    i was talking about the slash in between the contact and the hash, but i didn't realize the final slash made any difference. I removed that, and it's all good.

    Many thanks dude, I really appreciate your help!

  7. Yukon Cornelius
    Posted 3 years ago #

    I meant dudes, of course. Many thanks to you both.


  8. Andrew Bartel
    Posted 3 years ago #

    Sure thing.

  9. guitarguy0124
    Posted 2 years ago #

    I have followed all of the instructions and simply cannot get this to work...

    I've tried both of these as the link:


    And then this is the html portion of the target anchor:

    <div id="bravone">
    <h5>Becoming A Brāv One</h5>

    What am I doing wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic