• Resolved whateverbatch

    (@whateverbatch)


    Hi,

    I’m trying to create a links page with an A-Z list of links across the page, with each letter linking to a particular location on the page.

    I have started with the ‘D’, inserted the link on the ‘D’ letter, with a destination at the ‘D’ part of the page, it’s not working.

    The more that I look at it, the more confused I am getting?

    Something that I have done before, but I can’t get it to work?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    To create the anchor, you used
    <a href="https://<a name=“d”>D</a>"><strong>D</strong></a>

    Change that to

    <div name="d" class="anchor">D</div>

    Adding the “class” attribute means you can style it using .anchor as a selector.

    Thread Starter whateverbatch

    (@whateverbatch)

    Hi Steven,

    Thanks for the reply.

    I need to link the ‘D’ in the list to the ‘D’ section of the page, what you have is not a link, yes it can be styled with the class, all I need is it to work, the style can come later?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The link <a href="#d">D</a> will link to that anchor.

    You put the link at the top and the anchor in the contents below.

    Thread Starter whateverbatch

    (@whateverbatch)

    Hi Steven,

    Done that, still not working?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Moved to Fixing WordPress, this is not an Everything else WordPress topic.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @whateverbatch Don’t use short links in these forums, those are expanded when found. That’s been abused in the past, don’t use them here.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    No, you’ve done it wrong.

    At the top, where you have A B C D

    It should be

    A B C <a href="#D">D</a> E F G

    Down below, it should be

    <div name="D" class="anchor"></div.D
    <p>Depression</p>

    Do not use a link down there, just the DIV.

    Thread Starter whateverbatch

    (@whateverbatch)

    Hi Steven,

    The above should be <div name=”D” class=”anchor”></div>

    Think I have done that but it still doesn’t work?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This is what’s in your source:

    <div class="anchor">
    <p><strong>D</strong></p>
    </div>

    It’s missing a ID="something"

    Correction to all the above…. I don’t know what I was thinking, but it should be ID=, not NAME=.

    Thread Starter whateverbatch

    (@whateverbatch)

    Thanks, Steven, all working now! ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘HTML links to a certain place on a page’ is closed to new replies.