Skip to content
Public Ticket #146

Creating Jump Links

Conversation thread

PenciDesign replied

Staff Reply

Hi,

Can you send me:

- Your admin url

- Your admin account ( username and password )

- The posts link you did create table of content.

I will take it a look.

Best Regards,

PenciDesign

Linda Joyce replied

Customer Reply

Unfortunately, no this does not help.

I was using the html code

\
<a name="section-1">This is content for section 1</a>\
I replaced it with your suggested code. The result is exactly the same. When you click the link to jump to the target text, you end up at a position four lines beneath the target text. I don't get it. I've created these jump links in other themes with absolutely no problem. But I can't make this work.

PenciDesign replied

Staff Reply

Hi,

If so, I think your markup is wrong.

Example for a table of content will look like this:

\
//Your table of content codes with anchor\
<a href="#section-1">Section 1</a>\
<a href="#section-2">Section 2</a>

And your content need to use ID to match with the anchor above

\
//Your HTML content\
<div id="section-1">This is content for section 1</div>\
<divĀ id="section-2">This is content for section 2</div>
\

Hope this help,

Best Regards,

PenciDesign

Linda Joyce started the conversation

Conversation Start

I'm trying to create a table of contents at the beginning of my post to allow navigation to specific sections. I have inserted my target (anchor) codes and created links. Unfortunately, when you click the link it always takes you to a spot about four lines beneath the target text. As a result, the reader can't see the text they're interested in on the screen. You have no idea where you are in the document. Can you help me to understand why this happens?

Want to join this conversation or access attachments? Sign in first.