Jump to content

Keep colour on menu items before hover

Go to solution Solved by tuanphan,

Recommended Posts

Hi, 

I've just built my new site using a 7.1 template and I need help keeping the yellow highlight on the relevant portfolio item on my homepage when selected. 


So for instance, when you land on the homepage the first portfolio link 'National Geographic' is already highlighted in yellow so it's clear which project you're looking at. 

 

I'm using the following code to change the portfolio items to yellow on hover. But I'm searching for new/additional code that will help do the above: 

.portfolio-hover-item-content:hover {
    color: yellow;
}

Site: adulalouschek.com 

Thanks in advance,

Adu

 

 

Edited by AduLal
Link to comment
  • Replies 3
  • Views 222
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Thank you. 

It works in highlighting the first portfolio item title when you land on the page but  I would like that first title to go back to white when I hover over another title. As you can see from screenshot there are now two titles highlighted when ideally it would just be one. 

Screenshot 2023-04-06 at 11.54.06.png

Link to comment
  • Solution
On 4/6/2023 at 5:57 PM, AduLal said:

Thank you. 

It works in highlighting the first portfolio item title when you land on the page but  I would like that first title to go back to white when I hover over another title. As you can see from screenshot there are now two titles highlighted when ideally it would just be one. 

Screenshot 2023-04-06 at 11.54.06.png

Remove code I sent & use this new code

ul.portfolio-hover-items-list>li:nth-child(1) * {
    color: #ff0 !important;
}
ul.portfolio-hover-items-list:hover li * {
    color: white !important;
}
ul.portfolio-hover-items-list:hover li:hover * {
    color: #ff0 !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

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.