0

I'm using <a href=”#”> on more pages to disable scrolling, and it works.

There is one page where I need to use <a href=”#/”> to make it work, because the browser is not adding the / at the end of the URL.

What's causing this? Why is this happening? 

dsz36
  • 127
  • 1
  • 7
  • Hello, I guess that more information is needed for this. What is the distinguishing feature of that page? Does it happen in all browsers? What happens if you don't add the / and click on the link? – g_bor May 05 '21 at 10:45
  • Sadly I can't find any distinguishing features in the code. It's the same in all browsers (MS Edge, Chrome PC/Android, Safari). If I don't add the / it scrolls to the top on click. On the other pages the browser adds automatically the / to the URL when it is clicked. – dsz36 May 05 '21 at 13:10
  • Does this help? https://stackoverflow.com/questions/4855168/what-is-href-and-why-is-it-used Basically href # is expected to scroll to top. The link recommends to use href="#!" as a placeholder on the assumpion that there is no anchor named "!" – g_bor May 05 '21 at 13:34
  • It looks like my question is a duplicate for that post. In my case practically the / works just like the ! – dsz36 May 05 '21 at 15:05

0 Answers0