vincentlefre Posted August 1, 2022 Share Posted August 1, 2022 (edited) Hey all, So I have added an underline to the active nav bar item using the follow code - .Header-nav-item--active { border-bottom: 1.5px solid #a96628; } The result is almost right, however the line overshoots the text slightly. This seems to be because the text has some kind of padding to the right and so the underline extends all the way to there ( see images below). Any ideas how I might eliminate this so that the underline is exactly the same width as the text? (This is using a Brine template in 7.0) Thanks in advance! Edited August 1, 2022 by vincentlefre Link to comment
Beyondspace Posted August 1, 2022 Share Posted August 1, 2022 2 hours ago, vincentlefre said: Hey all, So I have added an underline to the active nav bar item using the follow code - .Header-nav-item--active { border-bottom: 1.5px solid #a96628; } The result is almost right, however the line overshoots the text slightly. This seems to be because the text has some kind of padding to the right and so the underline extends all the way to there ( see images below). Any ideas how I might eliminate this so that the underline is exactly the same width as the text? (This is using a Brine template in 7.0) Thanks in advance! Can you share your site with the protected password so we can take a look at it? Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
vincentlefre Posted August 1, 2022 Author Share Posted August 1, 2022 Sure - https://adrisenergy.squarespace.com/ Password - 1234 Link to comment
tuanphan Posted August 4, 2022 Share Posted August 4, 2022 On 8/1/2022 at 10:00 PM, vincentlefre said: Sure - https://adrisenergy.squarespace.com/ Password - 1234 You can use this new code to add underline on active items a.Header-nav-item.Header-nav-item--active:after { content: ""; background-color: #a96628; position: absolute; left: 0; width: 90%; bottom: 0; height: 1.5px; } a.Header-nav-item.Header-nav-item--active { position: relative; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
vincentlefre Posted August 4, 2022 Author Share Posted August 4, 2022 @tuanphan This works well, thank you very much 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