Jump to content

Add background fill padding to header hover states

Recommended Posts

I added this CSS to my header buttons:

 

.header-nav a:hover{
  background:white!important;
    color:#dcdad5!important;
}

a {
text-decoration: none !important;
}

header a {
  background-image: none !important;
}

 

My issue now, is that the background color block (background:white!important;)  is cut off right at the edge of the text on both sides. Does anyone know how I can extend the background a few pixels on both sides on hover?

thank you.

 

 

Link to comment
  • Replies 3
  • Views 277
  • Created
  • Last Reply

Top Posters In This Topic

On 6/16/2023 at 12:57 PM, ellebangs said:

Squarespace URL:

https://guava-viola-6n8t.squarespace.com/

Thanks

 

 

Add to Design > Custom CSS

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