Jump to content

Need help with a css code for my dropdown menu.

Recommended Posts

Site URL: http://www.koenstijnen.nl

Hi,

I already have a custom css code for my header while hovering that works great, I recently switched from portfolio items to folders with specific pages. on hovering the highlighting of the specific page works.

 

however when I click a certain project within the folder it highlights everything in that folder, is there a css code I can use that only highlights the specific project im viewing?

 

 

 ( first image is while hovering, second image is when clicking that specific page )

Screen Shot 2022-02-17 at 12.10.04.png

Screen Shot 2022-02-17 at 12.10.12.png

Link to comment
  • Replies 2
  • Views 299
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 2/17/2022 at 6:13 PM, KoenS said:

Site URL: http://www.koenstijnen.nl

Hi,

I already have a custom css code for my header while hovering that works great, I recently switched from portfolio items to folders with specific pages. on hovering the highlighting of the specific page works.

 

however when I click a certain project within the folder it highlights everything in that folder, is there a css code I can use that only highlights the specific project im viewing?

 

 

 ( first image is while hovering, second image is when clicking that specific page )

Screen Shot 2022-02-17 at 12.10.04.png

Screen Shot 2022-02-17 at 12.10.12.png

Change this code

.header-nav-item--active a {
    color: #e30b1a !important;
}

to this

.header-nav-item--active>a, .header-nav-folder-item--active a {
    color: #e30b1a !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.