The offset not working well when the anchor div is higher than viewport (100vh for example). Their is jump
@Siton_Systems , this is a known issue with anchor links with fixed navbar and 100vh sections.
There is a work around however. Set your section 2
to relative and add a new div class="anchor"
with position absolute-top
. Now we do some math.
Since your Navbar is 60px
high, select your anchor div
, set a margin-top: 60px
and set the height of the anchor div
to 60px
as well. Give the anchor div
and ID #anchor
and set the nav button
to go this anchor tag
instead.
This is how your section will be setup: