Anchor Link Not Working!

Hi, I’ve created an anchor link and in theory it should be working, but when I click on the text that should link to it, it just goes to the top of the page instead of at the section of text I’ve set the anchor to. I’ve cleared my cache, tested if it’s a plugin conflict, yet it still doesn’t work and I’m using the latest version of Cornerstone/X Theme.

Hope you can help!

I’ll put the URL in a secure note as it’s on a temp link.

Thanks!

Hi There,

Upon checking that page, I couldn’t find any section or HTML element has the universal_dedicated_electrics ID.

Could you please double check?

Please note that the ID of section isn’t included the # character:

Thank you.

Hi, thanks for looking into it, it wasn’t working because I put # within the ID! I’ve taken that off and it’s ok now.

On the front end, when you click on the link that takes you the page with the section with the anchor linked to it, the content starts too far up the screen (behind the transparent navbar). Is it possible for it to start under the navbar by adding padding within CSS instead of me having to add the anchor to the wrong section above the one I want, just so it displays at the correct point of the page.

Hope that makes sense!

Thanks!

Hi There,

Thanks for writing in again!

Yes you can add padding to manage the spacing, but that also create issue in mobile device as it may look more space over there.
You can consider both the screen and make the changes to the padding of the section.

Thanks

Hi, I didn’t mean for me to add padding to the actual sections as the layout is how I want it with all the spacing etc, I just wanted the anchor content to appear under the navbar after clicking onto the link - I’ve added an anchor link to the section ‘STEP 3 - Choose which tow bar wiring option…’ which is linked to the text in the black box down the right hand side (number 3) ‘View vehicle specific electrics’. When you click on ‘View vehicle specific electrics’ it opens the page with the anchored text, but the text isn’t shown in the middle of the screen, it’s at the top of the screen and you can’t read most of it as it’s covered by the navbar! Instead of me having to put the anchor to the wrong text in the section above it (so the correct text is viewed in the centre of the screen) is it possible to overcome this with CSS? I don’t want to alter the actual layout as it’s fine as I have it, it’s just for the anchor point.

Thanks!

Hey @core365,

Sorry for the confusion. What you’re trying to do is not possible in X. Out of the box, there is a spacer that offsets the content on top of the page when the Navbar becomes sticky but that won’t work for your header modification.

This setup is possible with Pro (one positioned absolute sticky bar setup). I’d recommend you upgrade if you can.

If not, this might be possible with a third party plugin or custom script which regretfully we could not develop or custom code.

Thank you for understanding.

Oh, ok, thanks for letting me know!

Cheers

You are most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.