Sooo, I’m currently trying to improve my documentation project (https://codepen.io/scissorsky/pen/mdLPKGK) and I’m happy with the desktop version, I’m just not happy with what it looks like on smaller screens.
As you can see, the nav-link I clicked on in this example (JavaScript and Java) takes me to the JavaScript section, but most of it gets covered by the navbar itself. Is there a way to get the sections to appear below the navbar? Google wasn’t helpful because I’m struggling to find the right key words to describe my problem. (Sorry for the confusing title, btw.)
one possibility is to use the @media to set an appropriate margin for the content you are jumping to (so as to push it down on search screens).
Another might be to use a grid layout so that the navigation always takes the first row and the content the remainder.
The margin solution didn’t work, but somebody else mentioned scroll-padding-top and that did the trick. I really appreciate your help, though. Thanks a lot!