Hello Hello Webflow Fam ,
Over the past few weeks, I have been noticing a lot of forum questions regarding anchor links on a 100vh Section
incorporated with the Webflow Navbar
element and setting its position to Fixed
. Apparently, on anchor-scrolling, it causes a skip which can be seen below:
At least for me, it does not occur when I create my own Fixed Navbar but occurs when you use Webflow’s Navigation Element and switch it to fixed
.
However, there is a workaround which can be used if this happens to you:
- Set your desired
Section
toposition: relative
- Add a
div class="anchor"
with an appropriateid
, sayanchor__%section_name%
- Set
anchor div
’s position toabsolute-top
Now we do a little math 👀
- Figure out the height of your navbar, in my case, it is
60px
.- Now, set the
height
of youranchor div
to60px
- Also, set a
margin-top
on youranchor div
of60px
OR add the offset with yourabsolute positioning
Your designer should have a preview as such:
- Repeat this for all your desired sections
- Now, set your
nav-links
to point to thisanchor div
instead
And you are done
Now instead of the buggy, glitchy, skippy animation to your 100vh
section, you get that serene, beautiful, elegant scroll to section
I hope this helps y’all. Let me know if you have any questions.
Here is a read-only link if you want to look at the project structure in depth.
Happy Designing!