Despite my best efforts, I am struggling to resolve an issue with my fixed bootstrap navbar and internal links. I have experimented with various solutions, including using a JavaScript onscroll event listener and applying styles directly in the markup. However, none of these approaches have yielded the desired result. Specifically, when clicking on any internal #about link, the content ends up falling beneath the navbar. I have attempted different strategies such as adjusting margins, using absolute positioning, and applying top -...px to .section2, but none have provided a satisfactory fix.
As a newcomer to web development, I am seeking specific guidance tailored to my code rather than general recommendations. You can view the live page to observe the issue when clicking on any #about section link: portfolio #about
For an easy fix, I discovered a solution that involves strategically adjusting margins and positions within a div element that contains the anchor. By applying negative and positive pixel margins, you can adjust the positioning to prevent the content from being hidden beneath the navbar. This simple trick has proven effective in one-page design websites.
Despite these efforts, clicking the about link in the navbar still presents challenges, leading to minor alignment issues. This ongoing difficulty necessitates a more targeted approach to resolving the problem.
Thank you for any assistance you can provide!