Site logo

Archived topic

Nested Anchor Links does not work on mobile [orbilan]

1 reply · Started by Sascha on December 21, 2021

Viewing posts 1–2 of 2

Hi

I have created a container with the anchor-text "nachhaltigkeit" inside another container "flexibilitaet" on this page.

There is also a menu-item "Nachhaltigkeit", which links to the nested container with the anchor "nachhaltigkeit". This is the URL of the menu-item.

This URl works fine on desktop. But on mobile only the "Innovation" page will be opened, but not the container/section which contains the anchor-text "nachhaltigkeit"!

Can you please help me fixing this? Please find credentials attached …

Thank you in advance and kind regards,
Sascha

Hi there,

Having 2 elements of the same ID will cause jump-link issues.

I've inspected the page and you have 2 Container blocks having the same "nachhaltigkeit" ID.

I understand why you need 2 (for swapping layouts between viewports) and you can keep it. We just need to modify the structure a bit.

Currently you have this:

> Container Block
>> Container block with "nachhaltigkeit" ID for desktop.
>> Container block with "nachhaltigkeit" ID for mobile.

Try nesting the Container Blocks this way:

> Container Block
>> Container Block (add the "nachhaltigkeit" ID here)
>>> Container block for desktop.
>>> Container block for mobile.

You then test it again. :D

This archived topic is closed to new replies.