WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Anchor name adds a slash

[Resolved] Anchor name adds a slash

  • Hi,

    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>
    <div>
        <h3>The Title</h3>
        <p>some text</p>
    </div>

    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.

    Thanks,

    Yukon

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Anchor name adds a slash’ is closed to new replies.
Skip to toolbar