Jump to content

Background highlight effect for main navigation link

Recommended Posts

  • Replies 6
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

17 hours ago, tucecoop said:

Also, how do I change the size of the background box (add padding etc) ?

You can add this code under your current hover code

div.header-nav-item>a {
    padding-left: 10px !important;
    padding-right: 10px !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

Thanks so much! Is there a way to change the color of the text on hover back to black, when it's on the active page? At the moment the text on the active page link is green on hover so you can't see it over the background

Link to comment
10 hours ago, tucecoop said:

Thanks so much! Is there a way to change the color of the text on hover back to black, when it's on the active page? At the moment the text on the active page link is green on hover so you can't see it over the background

You can use this CSS code

div.header-nav-item--active>a:hover {
    color: #000 !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.