Jump to content

Navigation menu color fade in on hover

Go to solution Solved by tuanphan,

Recommended Posts

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

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;
}

 

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.