Streaming live at 10am (PST)

No smooth scrolling, anchor link navigation?

It s a fresh, new week. And maybe I m totally done.
But I created a new test site and added a fixed navigation and
some sections within the page.

I created anchor links and when I publish the site and click on one of the
navbar links, there is no smooth scrolling animation to the corresponding anchor.

Is it just me _ what am I missing?

p.s. Is there still a legit workaround to have the navbar stop at the section itself UNDER the navigation bar
instead of scrolling over it and hiding the first content element?


Smooth scrolling

Name your sections “one” “two” “three” instead of “1” “2” “3”. In other words don’t name anything with digits first, caps, dashes, spaces etc HTML tags and names, to avoid issues with browsers, JS, CSS etc…

Snap to the bottom of the Nav

It’s not a workaround. If you have a header, sections will stick underneath, if you have a Nav separated from the header, it will stick underneath. i don’t know why yours bugs, I removed it, put a new one, give it fixed pos, 100% width and it works as expected. You’d need to check the “Disable scroll offset…” checkbox in order to behave differently, actually.

Oh man what a morning … of course!!!

I also forgot to set a width and height to the navbar example. Therefore it could not calculate the offset needed to be positioned before the corresponding section.

Man… turbo delete this one …
THANKS @vincent

Don’t be so hard on yourself, we’re so close to the breakfast still :wink:

And I have to say, the “header and/or nav” rule is only clear to me since yesterday, thanks to @cyberdave who took the time to craft a definitive example about it.

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