As a beginner in HTML and CSS, I am currently working on adding a navigation bar to my one-page website. I want the navigation bar to smoothly guide users to different sections of the page when they click on a link. To achieve this, I am using anchors and reference links like this:
<a name="JR_Harrison_Target"></a>
Then, I link to the section by using:
<a href="#JR_Harrison_Target">Introduction</a>
The issue I am facing is that each time I click on the link, it takes me to the new section with a large margin of pixels at the top of the browser. This happens regardless of which section I try to navigate to. Is there a way for me to adjust the position of the anchor so that the window scrolls accurately to the desired location? Any help would be greatly appreciated. Thank you!
Example of the issue: