Archived topic
html anchor not working
11 replies · Started by jal-mj on May 28, 2021
Hi,
I have done an anchor linked from the main page and it's seems that it doen't work (from mobile device).
https://nueva.bycamper.es/reserva-tarifas/#tarifas
This is the link...
As I thing have to write the anchor in the advanced area html: "tarifas"
Later, to link there, the page nueva.bycamper.es/reserva-tarifas/#tarifas
Is that ok?
I think is working in the desktop version but not in mobile.
Could you please check it to see what I'm doing wrong? Thank you very much.
Hi there,
the only difference i see on Mobile is the menu link is without the #anchor ie. https://nueva.bycamper.es/reserva-tarifas/
Do you have a separate Menu assigned to the Off Canvas ?
Mmmm.
the url is the same in all formats... I have seen now and it doens't change. So... what do you mean? I don't have a separate menu...
This "Tarifas" https://www.screencast.com/t/NQvl82t2enRq is the one that i want the url to https://nueva.bycamper.es/reserva-tarifas/#tarifas
Thank you.
Yeah the link is taking me to the top of the gravity form and not the Tarifs headline.
What happens if you use a different anchor ? Instead of #tarifas try #tarifas-jump - we can test if there is a conflict with the ID.
...it looks that it doens´t work. I have change the name of the anchor but still the same problem. Is really strange because in desktop version works well, only fails in the mobile version.
any other idea I can try?
Thank you.
Hi Juan,
You anchor is added to a headline block:
https://www.screencast.com/t/wwAf3qQdBuoV
In mobile, this headline block moves down, so the link jumps down.
You'll need to remove the anchor from this headline block, and add it to the very outside container:
https://www.screencast.com/t/JwICPboIomjI
ok I want it in the section of tarifas (right column), so if i add it in the very outside container, link will go to the top of the first block, doens't it? I don't one that, I want go to the top of the right column.
Thank you.
Then I misunderstood your issue here, sorry about that.
https://www.screencast.com/t/Cc1wJwU7M
The mobile works in the developer's tool, but not on an actual mobile device. Your settings look right.
Not sure if it'll fix the problem, but let's try to put the anchor to the container instead of the headline block, and clear cache and disable the cache plugin for now.
https://www.screencast.com/t/eOyIF5G1uGSG
Let me know :)
Hey Ying! I have disabled litespeed cache and it works well. But, as you can know... this is a big nuisance for the performance of the page.
I have been trying to disabling cache only in this page /reservas-tarifas/ and it doesn't work either. So, I don't know how I can fix it or having a similar behavior...
any idea?
Thank you!
I'd recommend checking with Litespeed cache's support team on this.
OK, thank you... I put a anchor inside the page and is working... so...is a solution by now.
Glad to hear :)