amchu Posted March 4, 2022 Share Posted March 4, 2022 (edited) Site URL: https://www.amandachung.ca/ Hi all! I tried to find a snippet of code to highlight the current page in my navigation bar as it's a little confusing at the moment. For now, when I hover over specific pages - it shows a beige line to highlight your selection before clicking, but once you land on the page it doesn't specify which page you're currently on. Is there a way that I could have the stretchy navigation line stay when the viewer is on the page? Or even just simply bold the selection? Edited March 4, 2022 by amchu Changed wording. Link to comment
Caroline_Smith Posted March 4, 2022 Share Posted March 4, 2022 (edited) Hello! You can use the following CSS rule to keep the underline when on a specific page. I commented out the bold rule in case you want to use it since you also mentioned that as a possibility. Add this to Design > CSS .header-nav-item--active:after { width: 100%; /*font-weight: bold;*/ } Edited March 4, 2022 by Caroline_Smith amchu 1 Feel free to email me with any customization inquiries or questions you may have! Free Squarespace Resources: DevTools Minicourse, 11-Step Guide to Improve Custom CSS, Free Product/Pricing Comparison Table Generator Link to comment
amchu Posted March 5, 2022 Author Share Posted March 5, 2022 On 3/3/2022 at 5:26 PM, Caroline_Smith said: Hello! You can use the following CSS rule to keep the underline when on a specific page. I commented out the bold rule in case you want to use it since you also mentioned that as a possibility. Add this to Design > CSS .header-nav-item--active:after { width: 100%; /*font-weight: bold;*/ } Thank you! This worked 🙂 I appreciate it!! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment