WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] link to spot on SAME PAGE wont work (3 posts)

  1. JanChristian
    Member
    Posted 3 years ago #

    I'm trying to jump to a spot on the same but it isn't working. The link is in the header and the anchor is on the About page.

    In the header I have the link as:

    <h2 id="nav4">
            <a href="/about#contact" title="Contact"><img src="http://grenadegearusa.com/wp-content/uploads/2011/04/contact.png" alt="Contact" /></a>
          </h2>

    On the About page I have the anchor as:
    <a name="contact"></a>

    It wont work. When I click the "CONTACT" header link it just (re)opens the ABOUT page.

    Any ideas?
    grenadegearusa.com/about

  2. Try putting the anchor on an id instead.

    I usually put them on heading tags. Are there any on your contact page?

    For example:

    <h1 id="contact">Contact Us</h1>

  3. JanChristian
    Member
    Posted 3 years ago #

    I added a / before the # and it works now.

    <a href="/about/#contact" title="Contact">

Topic Closed

This topic has been closed to new replies.

About this Topic