Jump to content

Navigation background color change on hover fill to full width of dropdown menu

Go to solution Solved by tuanphan,

Recommended Posts

Hello, I currently have custom css to make my navigation background change color on hover, but the background color only goes part way on the width of the dropdown menu. I'm new to coding, so I'm not sure how to fix this on my own but I was wondering if anyone knew how to fix this. I couldn't find any posts describing how to do this based on my verbiage for a search, but that may be because I do not know the correct terms for things. 

For example, it currently looks like this (how the highlight section has no padding on the sides of the word "about" & ends within the margins of the dropdown menu on "employment",

Screenshot2023-06-26162634.png.cfe19c5a62e47d2dca17d097f6f93050.pngScreenshot2023-06-26162925.png.e8136f110bbf41280144726b5d5c37ab.png

but i would like it to look more like this and stretch the whole way across the dropdown:

Screenshot2023-06-26162742.png.91fb80391ef90128fc07cfeb426c53c4.png

Thanks in advance!!

Link to comment
  • Replies 4
  • Views 956
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
15 hours ago, gibgib said:

Don't remove any code in your current code. Add this to Design > Custom CSS

div.header-nav-folder-content {
    padding: 0 !important;
}
div.header-nav-folder-content div a {
    padding: 0.5em 1em !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.