mrharris222 Posted January 25, 2023 Share Posted January 25, 2023 Hello, I used some code from another post to have my navigation links change color on hover and it works great. I was wondering if there is a way I can customize it so that the color fades in on hover. This site is a good example of what I'm wanting: https://www.mattnaylor.com/ This is the code I'm currently using: .header-nav-item>a:hover { color: #8FB344 !important; } .header-nav-folder-item:hover a { color: #8FB344 !important; } /* desktop*/ .header-nav-item--active>a { color: #8FB344 !important; } /* folder */ .header-nav-folder-item--active a { color: #8FB344 !important; } Thanks! Link to comment
Solution tuanphan Posted January 27, 2023 Solution Share Posted January 27, 2023 Change your code to this header#header a { transition: all 0.3s ease; } .header-nav-item>a:hover { color: #8FB344 !important; transition: all 0.3s ease; } .header-nav-folder-item:hover a { color: #8FB344 !important; transition: all 0.3s ease; } /* desktop*/ .header-nav-item--active>a { color: #8FB344 !important; } /* folder */ .header-nav-folder-item--active a { color: #8FB344 !important; } mrharris222 and ec25 1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
mrharris222 Posted January 27, 2023 Author Share Posted January 27, 2023 9 hours ago, tuanphan said: Change your code to this header#header a { transition: all 0.3s ease; } .header-nav-item>a:hover { color: #8FB344 !important; transition: all 0.3s ease; } .header-nav-folder-item:hover a { color: #8FB344 !important; transition: all 0.3s ease; } /* desktop*/ .header-nav-item--active>a { color: #8FB344 !important; } /* folder */ .header-nav-folder-item--active a { color: #8FB344 !important; } Perfect! Thank you so 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