Site icon Catch Themes

Using Navigation Bar for Anchors, But Remaining Highlighted

I'm trying to utilize the nav bar for navigation on the main page. So when I just use tags (#about-us), this works just fine. However, I'm going to have other pages that the nav bar will take the user to. So when they are on those internal pages, if they click on "About Us," that anchor will not take them back to amperellc.com/#about-us. If I assign all of the links in the nav bar to full URLs, like the one I just gave, all of the links for the main page are highlighted as "active." Is there a way that I can use the full URL for the anchor, but not have the links be active by just being on the Main page? Is there a way to only have them be active when they are on the tag that they are linked to? i.e. when the user is on amperellc.com, none of the links are active. But when clicking on About Us, they are scrolled down to amperellc.com/#about-us and then that link is now active. I have all of this as a saved draft in my site, and it's not reflecting this changes on the live version. But the url is amperellc.com, if you haven't guessed that by now. Thank you!
Exit mobile version