Jump to content

Customizing rollover states on menu

Recommended Posts

Hello,

Apologies if this is something basic but I'm looking to have my color rollover state stay. Right now with my current code, it's just changing with the mouse rollover but would love for the color to stay.

Can you help?

This is my current code:

/* Nav item color */
.header-nav-item a {
    color: #ffffff !important;
    transition-duration: 0.4s;
}
/* Nav item hover color */
.header-nav-item a:hover {
    color: green !important;
    transition-duration: 0.4s;
}
/* Nav item active color */
.header-nav-item--active a {
    color: green !important;
}
 

rollover_state.jpg

Link to comment
On 9/30/2021 at 12:06 AM, markserfx said:

Hello,

Apologies if this is something basic but I'm looking to have my color rollover state stay. Right now with my current code, it's just changing with the mouse rollover but would love for the color to stay.

Can you help?

This is my current code:

/* Nav item color */
.header-nav-item a {
    color: #ffffff !important;
    transition-duration: 0.4s;
}
/* Nav item hover color */
.header-nav-item a:hover {
    color: green !important;
    transition-duration: 0.4s;
}
/* Nav item active color */
.header-nav-item--active a {
    color: green !important;
}
 

rollover_state.jpg

Can you share your site with the Protected Password?

Edited by bangank36

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, Keyword Highlighter
If 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

@markserfx You mean active item? It looks like you used Link Items to add About, Contact....

You can drag these original pages from Not Linked >> Main Navigation, the above code will work

 

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

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.