I’m currently working on my last project for the Responsive Web Design project and I have a bug I can’t fix.
The problem is that every time I click a link to navigate to the section, the top of the section is hidden behind the navigation bar.
I got so far to figure out that the problem is caused by
position: fixed but I couldn’t find a way to fix it yet.
I would appreciate if you could have a look at it: https://codepen.io/stvfrnzl/pen/gNwBmM
Thanks a lot!
position: fixed;your nav-bar it no longer counts in the page set-up.
So you could try to increase you
margin-top for the
<h1> elements, so that the
margin compensates for the fixed navbar.
Update your CSS here:
min-height instead of height, and padding-top: 45px is what I used.
I found a working solution:
I used anchor tags at the beginning of every section, which is nothing more but an empty div and a respective class.
Thank you for your help!