Hey Everyone, I am currently working on the Personal Portfolio page. Most of what I’ve done has been fairly easy, and what I couldn’t do, google searches helped. However, I do not know how to make my navigation bar work. I’ve tried multiple different ways but I am so confused on how to actually make my navigation bar scroll down the page. I don’t know if i have missed something very easy, but it’s become rather frustrating. When I look at other people’s portfolios, It looks like a cluster and I don’t understand anything. Any feedback, or just somewhere to start, would be helpful.
where is the link to the portfolio page?
Look at position fixed if you want the nav bar to stay at a fixed position the whole time.
Try using scrollY and the scroll event if you want the nav bar to not be in a fixed position the whole time but instead stick to the top if the user scrolls below it.
Those links are called Bookmark Links or in-page links, in-page anchors, etc… You can read about how to use them here in the section called
HTML Links - Create a Bookmark: https://www.w3schools.com/html/html_links.asp
In the example they provide, they link to Chapter 4 with this hyperlink:
<a href="#C4">Jump to Chapter 4</a>
#C4 represents the ID of the element they link to:
<h2 id="C4">Chapter 4</h2>