Proper Navbar

Hey, I have a navbar which currently links to certain sections of my website. My navbar is always visible, hence why when you click on the sections in the navbar some get hidden, how do I resolve this issue? I will share a codepen below.The icons are probably broken, but they work for me (and I can't add on Codepen since I don't have premium). https://codepen.io/Joni8829/pen/BaEwJpO
4 Replies
green
green•8mo ago
i dont know if this is the best solution but you can add scroll-margin-top: (headerheight); to the sections
Kevin Powell
Kevin Powell•8mo ago
scroll-padding-top: 5rem; should do it oh, I was beat to it 😅 I always have better luck with scroll-padding over scroll-margin, I don't even know what the difference is tbh, I just try one, then the other when the first one doesn't work 😆 - I should probably read up on the difference
green
green•8mo ago
i was just wondering about what the difference would be haha, didnt know there was a padding version of it as well. thanks!
Joni
JoniOP•8mo ago
Thank you so much!
Want results from more Discord servers?
Add your server