Abhilash Posted October 5, 2021 Share Posted October 5, 2021 Site URL: https://blog.ultrahuman.com Code used: .header-nav-item a:hover { text-decoration: underline; } The underline effect comes only when you hover over the navigation. I want the underline to be present under all navigation buttons at all times. Can anyone please help? Link to comment
iamdavehart Posted October 5, 2021 Share Posted October 5, 2021 remove :hover from your rule. .header-nav-item a { text-decoration: underline; } Dave Hart. Software/Technology Consultant living in London. buymeacoffee Link to comment
Abhilash Posted October 5, 2021 Author Share Posted October 5, 2021 18 minutes ago, iamdavehart said: remove :hover from your rule. .header-nav-item a { text-decoration: underline; } Hey, I tried this, but the underline gets removed completely with this code. I want the underline effect to be present at all times. Link to comment
iamdavehart Posted October 5, 2021 Share Posted October 5, 2021 OK, add !important to it, which tells it to override any other rule that's been set at the same or a more specific scope. like this: .header-nav-item a { text-decoration: underline !important; } Dave Hart. Software/Technology Consultant living in London. buymeacoffee Link to comment
Abhilash Posted October 7, 2021 Author Share Posted October 7, 2021 On 10/5/2021 at 7:36 PM, iamdavehart said: OK, add !important to it, which tells it to override any other rule that's been set at the same or a more specific scope. like this: .header-nav-item a { text-decoration: underline !important; } Thanks a lot, this worked 🙂 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