These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
Back to All

HTML Linking to element is broken

Greetings all,

I've run across a rather strange problem that only seems to be occurring on one particular client's website. I created an anchor element and set the href attribute to point to "#top", then I set an h1 element further up the page with the id "top". Here's the basic structure:

Top of the Page

Lorem ipsum...

Curabitur pretium...

... Back to Top

This should align the h1 element at the top of the window when the user clicks "Back to Top." I can confirm when I manually add #top at the end of the URL, the page aligns itself at the h1 element. However, when I click on "Back to Top," the site inserts a "/" between the "#" character and "top," which breaks the link.

Trying to find a workaround, but in the meantime I'm wondering if anyone here has ever encountered a problem like this before. I'll update the topic if I'm able to find a solution.