• Resolved lenavigateur

    (@lenavigateur)


    Hello,

    On the homepage slider, two slides contain links (the green and purple ones) to homepage sections. Link text : “EN SAVOIR PLUS”. But when you click these links, it doesn’t scroll to the exact anchors (https://dual-energie.com/#VotreSolution and https://dual-energie.com/#Autoconsommation).

    These anchors can also be reached from the top menu (“Votre solution” and “Autoconsommation”), the link URLs are the same, but when you click the menu links, they lead you to the exact position of the anchor.

    Also, how to achieve a smooth scroll when clicking the slider links?

    Thanks a lot!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Gabor

    (@nextendweb_gabor)

    Hi @lenavigateur!

    The problem seem to be related how browsers are handling anchors. You are using an <a> link for the ID:
    <a id="VotreSolution"></a>

    and this is the issue, that even if you just open up the url:
    https://dual-energie.com/#VotreSolution
    you will see it being scrolled to the wrong location, to the same location our slider or any url besides your top menu would scroll to. You should replace this with a div element:
    <div id="VotreSolution"></div>

    and it will be fine. But you should note, that anchors are scrolling their id elements to the very top part of the page, so currently your top menu has custom codes to scroll higher, to not make the floating menu scroll over the content.

    To have smooth scrolling, you would need the Pro version of our slider, where at any link:
    https://smartslider3.helpscoutdocs.com/article/371-link
    you can choose Actions -> Scroll to, and you could insert the anchor there and it would smooth scroll.

    • This reply was modified 6 years ago by Gabor.
    Thread Starter lenavigateur

    (@lenavigateur)

    Perfect!
    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Anchor links not going to exact position’ is closed to new replies.