Ansazu10 Posted October 19 Share Posted October 19 Hello, I need to add an underline as hover on the menu items on navigation bar. I want to make each different per section and to remain when it's active. I'm using something this code but it's not working correctly .header-nav-item a:hover { text-decoration: underline; text-decoration-color: #2C6BDB; text-underline-offset: 8px; text-decoration-thickness: 8px; } .header-nav-item a:active { text-decoration: underline; text-decoration-color: #2C6BDB; text-underline-offset: 8px; text-decoration-thickness: 8px; } Link to comment
Web_Solutions Posted October 19 Share Posted October 19 6 minutes ago, Ansazu10 said: Hello, I need to add an underline as hover on the menu items on navigation bar. I want to make each different per section and to remain when it's active. I'm using something this code but it's not working correctly .header-nav-item a:hover { text-decoration: underline; text-decoration-color: #2C6BDB; text-underline-offset: 8px; text-decoration-thickness: 8px; } .header-nav-item a:active { text-decoration: underline; text-decoration-color: #2C6BDB; text-underline-offset: 8px; text-decoration-thickness: 8px; } Can you share your website URL? Ainul 1 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Ansazu10 Posted October 19 Author Share Posted October 19 Yes: https://grouper-deer-35ne.squarespace.com/home password is 1234 Link to comment
Solution Web_Solutions Posted October 20 Solution Share Posted October 20 8 hours ago, Ansazu10 said: Yes: https://grouper-deer-35ne.squarespace.com/home password is 1234 Replace your code with the code below. .header-nav-item a:hover, .header-nav-item--active > a { text-decoration: underline !important; text-decoration-color: #2c6bdb; text-underline-offset: 8px !important; text-decoration-thickness: 8px !important; background: none !important; } .header-nav-item:nth-child(1) a { text-decoration-color: #2c6bdb !important; } .header-nav-item:nth-child(2) a { text-decoration-color: #e64535 !important; } .header-nav-item:nth-child(3) a { text-decoration-color: #f9bc4e !important; } .header-nav-item:nth-child(4) a { text-decoration-color: #266e46 !important; } Ansazu10 and Ainul 1 1 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Ansazu10 Posted October 20 Author Share Posted October 20 MD Rofik Thank you so much! This works perfectly 🙂 I really appreciate your help!!! 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