XF 2.0 HTML Anchors On Page

KensonPlays

Well-known member
Accepted Solution (for you all searching!):
You don't include the hashtag in the attribute, and in HTML5 you just use the id attribute instead of name:
HTML:
<a id="Social">Social media</a>



For some reason, I was able to get them to work on one page, but not another.

I have a '/info/' page on my website that uses anchors and a TOC.

TOC
- <a href="#Social">Social Media</a>

(many lines under)

<a name="#Social">Social media</a>

It is not working, not scrolling once clicked. The A Name is in an H3 element.

Here is the HTML code: https://pastebin.com/1QFRa0h7

EDIT: I am able to get the "Back To Top" (#Top) links working, but still not for the actual sections.
 
Last edited:
You don't include the hashtag in the attribute, and in HTML5 you just use the id attribute instead of name:
HTML:
<a id="Social">Social media</a>
 
Top Bottom