Jump to content

Dropdown Menu colour Squarespace 7.1

Go to solution Solved by tuanphan,

Recommended Posts

I am looking for code to change the background color of the navigation title when you hover over it. In the example attached, Id' like the background behind the word "Programs" to be the same cream color as the dropdown.

If this isn't possible, is thre at least code to change the text color to the cream color upon hover?

Thanks in advance!

368555300_262258840081665_893774829329632163_n.jpg

Edited by Benken2
Link to comment
14 hours ago, Benken2 said:

I am looking for code to change the background color of the navigation title when you hover over it. In the example attached, Id' like the background behind the word "Programs" to be the same cream color as the dropdown.

If this isn't possible, is thre at least code to change the text color to the cream color upon hover?

Thanks in advance!

368555300_262258840081665_893774829329632163_n.jpg

Add to Website > Website Tools > Custom CSS

div.header-nav-item:nth-child(2)>a:hover {
	background-color: #c3bdae !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
13 hours ago, Benken2 said:

Thank you! What code would I use to put an outline around the dropdown box?

Use this

div.header-nav-item:nth-child(2)>a:hover {
	background-color: #c3bdae !important;
}
.header-nav-folder-content {
	border: 2px solid #f1f !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
  • 2 months later...
11 hours ago, ozi said:

Hi. For the website:

https://fennel-swan-fakr.squarespace.com/

pw: VestedBeyond@)@##

Could you help with the following:

1) Make the font size smaller on my drop down menu items: 0.9em on desktop and 0.8 on mobile

2) On mobile overlay menu, make the button "Schedule a consultation" show before the LinkedIn icon, without changing the desktop navigation order.

Thank you!

#1. Add to Website > Website Tools (under Not Linked) > Custom CSS

div.header-nav-folder-content * {
    font-size: 0.9em !important;
}
[data-folder] div.container.header-menu-nav-item * {
    font-size: 0.8em !important;
}

#2. I don't see button + icon. Can you check it again?

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
12 hours ago, tuanphan said:

#1. Add to Website > Website Tools (under Not Linked) > Custom CSS

div.header-nav-folder-content * {
    font-size: 0.9em !important;
}
[data-folder] div.container.header-menu-nav-item * {
    font-size: 0.8em !important;
}

#2. I don't see button + icon. Can you check it again?

Thank you! Here are screengrabs of the button + icon on mobile and desktop highlighted with magenta (see attached)

 

Screenshot 2023-11-07 at 11.37.11 AM.png

Screenshot 2023-11-07 at 11.38.15 AM.png

Link to comment
On 11/7/2023 at 11:39 PM, ozi said:

Thank you! Here are screengrabs of the button + icon on mobile and desktop highlighted with magenta (see attached)

 

Screenshot 2023-11-07 at 11.37.11 AM.png

Screenshot 2023-11-07 at 11.38.15 AM.png

You can use this CSS code

/* Button before icon */
.header-menu-cta {
    order: 2 !important;
}
.header-menu-actions.social-accounts {
    order: 3 !important;
}

image.png.5361d3afab3f1642e028826e979f04f7.png

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
  • 1 month later...
On 7/29/2019 at 7:59 AM, tuanphan said:

@StephenWise1999 Add to Home > Design > Custom CSS

 
/* Change dropdown menu background */
.header-nav-folder-content {
   background: #febf00 !important;
}


 

 

Hello! I used this code to change the color of my dropdown menus. However, I would like each dropdown to be different colors. I've added solid boxes with different color backgrounds around each nav folder/link and want those colors to be the same for the dropdown menu. I added "nth-child(1)" and "nth-child(2) to target each dropdown menu that I'm trying to change, but the color applies to all of my dropdown menus, not the one I'm trying to target. My site is https://shallot-octagon-t35z.squarespace.com/ and the pw is: GreaterFalls

Here is the code I'm using:

div.header-nav-folder-content:nth-child(1) {
   background: #0154a2 !important;
}

div.header-nav-folder-content:nth-child(2) {
   background: #ed1e2e !important;
}

@tuanphan can you help me figure this out? Thank you in advance.

Link to comment
10 hours ago, jackweinstein said:

Hello! I used this code to change the color of my dropdown menus. However, I would like each dropdown to be different colors. I've added solid boxes with different color backgrounds around each nav folder/link and want those colors to be the same for the dropdown menu. I added "nth-child(1)" and "nth-child(2) to target each dropdown menu that I'm trying to change, but the color applies to all of my dropdown menus, not the one I'm trying to target. My site is https://shallot-octagon-t35z.squarespace.com/ and the pw is: GreaterFalls

Here is the code I'm using:

div.header-nav-folder-content:nth-child(1) {
   background: #0154a2 !important;
}

div.header-nav-folder-content:nth-child(2) {
   background: #ed1e2e !important;
}

@tuanphan can you help me figure this out? Thank you in advance.

Use this code

div.header-nav-item:nth-child(1) div.header-nav-folder-content {
    background: #0154a2 !important
}

div.header-nav-item:nth-child(2) div.header-nav-folder-content {
    background: #ed1e2e !important
}

image.png.9606fcb62808c92e6fa5e02d01ef6d58.png

image.png.7db36f7ad995c9565462e3fddbb47f8e.png

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
  • 4 weeks later...
2 hours ago, mikesmonsters said:

Hi there, I'm having trouble making my dropdown menu in my overhead menu bar change to anything other than white. Can anyone help with making it transparent?

site is www.mikemonaghan.photography

Thank you for any help!!

Screenshot 2024-01-03 at 11.02.48 PM.png

Use this CSS code

div.header-nav-folder-content {
    background-color: #f1f !important;
}

image.png.0739da1e65f3e946add09a513b3dc5e5.png

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
On 12/12/2023 at 8:53 PM, tuanphan said:

Use this code

div.header-nav-item:nth-child(1) div.header-nav-folder-content {
    background: #0154a2 !important
}

div.header-nav-item:nth-child(2) div.header-nav-folder-content {
    background: #ed1e2e !important
}

image.png.9606fcb62808c92e6fa5e02d01ef6d58.png

image.png.7db36f7ad995c9565462e3fddbb47f8e.png

@tuanphan i hadn't seen that you'd responded to this. Worked perfectly! Thank you!

Link to comment
12 hours ago, tuanphan said:

Use this CSS code

div.header-nav-folder-content {
    background-color: #f1f !important;
}

image.png.0739da1e65f3e946add09a513b3dc5e5.png

Thank you so much for the help! Does this purple/pink dropdown menu mean that it has a color set somewhere else and I have to adjust that to make it transparent? I appreciate the quick response!!

Link to comment
10 hours ago, mikesmonsters said:

Thank you so much for the help! Does this purple/pink dropdown menu mean that it has a color set somewhere else and I have to adjust that to make it transparent? I appreciate the quick response!!

If you need to make it transparent

just change

#f1f

to

transparent

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
  • 2 weeks later...

Hi, I'm looking for some code to change the background colour of a drop down menu but only on a particular page.

My main site has a yellow background with black font, but one page has a dark background with white font, and so the custom CSS I input to make the dropdown box white doesn't work on this page as the font becomes invisible.

I want to change the background colour of this dropdown menu. The page is www.lastslice.com.au/events

Link to comment
20 hours ago, Hayls23 said:

Hi, I'm looking for some code to change the background colour of a drop down menu but only on a particular page.

My main site has a yellow background with black font, but one page has a dark background with white font, and so the custom CSS I input to make the dropdown box white doesn't work on this page as the font becomes invisible.

I want to change the background colour of this dropdown menu. The page is www.lastslice.com.au/events

You can use this CSS code

body#collection-63abfe094053d730cdebc53b .header-nav-folder-content {
    background-color: yellow !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
  • 1 month later...

Thank you for this great post. 

I am still having drop down menu styling issues. I may have missed in this post.

My home page navigation works fine and hovers using the correct color. The home page is inverse so navigation is white with the correct hover color.

Once I click on the dropdown menu (portfolios), the menu items are all the active color, which is also the hover color. An underline indicates which page is active, which makes it understandable. I would like the dropdown menu to be the default menu color, with the active color being the only different color. 

When selecting any other high level menu item (about) and then hovering over (portfolios), the menu is the default color as expected. The colors only change once you click on the submenu.


It works well enough but seems sloppy. 

my site: www.dianedhemingway.com

 

Link to comment
6 hours ago, dianedhemingway said:

Thank you for this great post. 

 

I am still having drop down menu styling issues. I may have missed in this post.

My home page navigation works fine and hovers using the correct color. The home page is inverse so navigation is white with the correct hover color.

Once I click on the dropdown menu (portfolios), the menu items are all the active color, which is also the hover color. An underline indicates which page is active, which makes it understandable. I would like the dropdown menu to be the default menu color, with the active color being the only different color. 

When selecting any other high level menu item (about) and then hovering over (portfolios), the menu is the default color as expected. The colors only change once you click on the submenu.


It works well enough but seems sloppy. 

my site: www.dianedhemingway.com

 

Change this code from CSS box

.header-nav-item--active a {
    color: #79c0a2 !important;
    background-image: none !important;
}

to this

.header-nav-item--active>a, .header-nav-folder-item.header-nav-folder-item--active a {
    color: #79c0a2 !important;
    background-image: none !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
  • 4 weeks later...

Hello - can someone help me with changing the color of the background for my drop down menu? I have pink font but the drop down shows up with a white background; I'd like to have it a lighter pink to distinguish it from the main page which is white. My site is www.bikerchiccupcakes.com Thanks so much!!

Link to comment
8 hours ago, KristinK said:

Hello - can someone help me with changing the color of the background for my drop down menu? I have pink font but the drop down shows up with a white background; I'd like to have it a lighter pink to distinguish it from the main page which is white. My site is www.bikerchiccupcakes.com Thanks so much!!

You can use this code to Website > Website Tools > Custom CSS

div.header-nav-folder-content {
    background-color: rgba(254, 104, 179,0.9) !important;
}

div.header-nav-folder-content * {
    color: white !important;
}

image.png.b331d28a1aab43846e57a7558b405331.png

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
  • 5 weeks later...
6 hours ago, MartinMurray said:

Any ideas on how to get rid of the cyan background on these links in the dropdown?... I have some custom CSS for the active link (1px cyan underline)... but it's also influencing the links within the drop-down.

Screenshot 2024-04-11 at 20.49.52.png

What is your site URL?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace (+100 Spark plugin customisations)
🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. 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.