Highlighted

Link zum Anker geht auf die Seite, aber nicht auf den Anker

Community Beginner ,
Nov 22, 2019

Copy link to clipboard

Copied

Hallo,

ich habe eine Downloadseite mit mehreren Links zu Ankern auf einer anderen Seite. Der Link springt zwar zu dieser Seite, aber nicht zu den einzelnen Ankern. So muss man trotz Anker scrollen, um auf untere Textstellen zu kommen.

Allerdings ist es kein Text, sondern eine 2-spaltige Tabelle mit einigen Zeilen. Aber kann es daran liegen?

Gruß

Margot-Jo

No, it would not be because you are using a two-column table. Don't use anchors, use unique 'ids' like below: They dont need to be called, one, two, three etc- you can name the 'ids' whatever you like, so long as each id is only used once per page.

 

<h4 id="one">Box 1</h4>

<h4 id="two">Box 2</h4>

<h4 id="three">Box 3</h4>

<h4 id="four">Box 4</h4>

<h4 id="five">Box 5</h4>

<h4 id="six">Box 6</h4>

 

Then in your link page point to the ids:

 

<a href="go-to-box.html#one">Box 1</a>
<a href="go-to-box.html#two">Box 2</a>
<a href="go-to-box.html#three">Box 3</a>
<a href="go-to-box.html#four">Box 4</a>
<a href="go-to-box.html#five">Box 5</a>
<a href="go-to-box.html#six">Box 6</a>

Topics

Error

Views

369

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Link zum Anker geht auf die Seite, aber nicht auf den Anker

Community Beginner ,
Nov 22, 2019

Copy link to clipboard

Copied

Hallo,

ich habe eine Downloadseite mit mehreren Links zu Ankern auf einer anderen Seite. Der Link springt zwar zu dieser Seite, aber nicht zu den einzelnen Ankern. So muss man trotz Anker scrollen, um auf untere Textstellen zu kommen.

Allerdings ist es kein Text, sondern eine 2-spaltige Tabelle mit einigen Zeilen. Aber kann es daran liegen?

Gruß

Margot-Jo

No, it would not be because you are using a two-column table. Don't use anchors, use unique 'ids' like below: They dont need to be called, one, two, three etc- you can name the 'ids' whatever you like, so long as each id is only used once per page.

 

<h4 id="one">Box 1</h4>

<h4 id="two">Box 2</h4>

<h4 id="three">Box 3</h4>

<h4 id="four">Box 4</h4>

<h4 id="five">Box 5</h4>

<h4 id="six">Box 6</h4>

 

Then in your link page point to the ids:

 

<a href="go-to-box.html#one">Box 1</a>
<a href="go-to-box.html#two">Box 2</a>
<a href="go-to-box.html#three">Box 3</a>
<a href="go-to-box.html#four">Box 4</a>
<a href="go-to-box.html#five">Box 5</a>
<a href="go-to-box.html#six">Box 6</a>

Topics

Error

Views

370

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
LEGEND ,
Nov 22, 2019

Copy link to clipboard

Copied

No, it would not be because you are using a two-column table. Don't use anchors, use unique 'ids' like below: They dont need to be called, one, two, three etc- you can name the 'ids' whatever you like, so long as each id is only used once per page.

 

<h4 id="one">Box 1</h4>

<h4 id="two">Box 2</h4>

<h4 id="three">Box 3</h4>

<h4 id="four">Box 4</h4>

<h4 id="five">Box 5</h4>

<h4 id="six">Box 6</h4>

 

Then in your link page point to the ids:

 

<a href="go-to-box.html#one">Box 1</a>
<a href="go-to-box.html#two">Box 2</a>
<a href="go-to-box.html#three">Box 3</a>
<a href="go-to-box.html#four">Box 4</a>
<a href="go-to-box.html#five">Box 5</a>
<a href="go-to-box.html#six">Box 6</a>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Nov 22, 2019

Copy link to clipboard

Copied

Thank you very much! I'll try to make it like this. Why did you put "h"4 before "id"? Isn't it the size of the font or title?

 

Margot-Jo

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
LEGEND ,
Nov 23, 2019

Copy link to clipboard

Copied

The use of the h4 tag was just an example of where you could apply an id.

 

You could apply the id to a paragraph tag or a span tag, a td tag etc.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Nov 24, 2019

Copy link to clipboard

Copied

Thank you very much! It works ... and it works with anchors too. Reading your advice I understood which was the mistake I made. I had only one ID anchor and gave the name to "#name".

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Learn Resources
Add a group