Jump to content

Different background-color for nav overlay text

Recommended Posts

I placed a semi-transparent box around my index navigation radio buttons [see attachment ] using this custom css code:

/* Transparent box behind navigation */
.Index-nav-text span {
  background-color: hsla(30, 0%, 25%, 0.30);
  padding: 8px;
  border-radius: 5px;
}

I'd like to use a different background-color box when the index navigation switches to overlay mode but can't figure out the code. I tried this but it didn't work:

.Index-nav-overlay-text span {
  background-color: hsla(30, 100%, 25%, 0.30);
  padding: 5px;
  border-radius: 5px;
}

Is this possible?

https://spinach-viola-en24.squarespace.com/

pass: support

background box.png

Link to comment
  • Replies 7
  • Views 1k
  • Created
  • Last Reply
  • 2 weeks later...
4 hours ago, tuanphan said:

You mean "Home"?

Add to Home > Design > Custom CSS


.Index-nav-item:hover .Index-nav-text span {
    background: red;
}

 

But can you have two different background colors for the overlay section and the regular section, like how the color of the radio buttons changes from orange to white when scrolling between them?

Thank you for your help!

Link to comment
15 hours ago, paulcristo said:

I haven't yet. Do you have any ideas? I'm still trying to have two different background colors for the overlay section and the regular section, like how the color of the radio buttons changes from orange to white when scrolling between them?

.Index-nav-text span {
    background: red;
}
.Index-nav-item:hover .Index-nav-text span {
    background: green;
}

You mean text background color?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.