How can I change the color of the drop-down menu when I hover over it?

Hello,

I recently added a drop-down menu to my website, and when I hover over the options, the background changes to purple, which is not in my color scheme. How can I choose which color is used?

My website is here: brigetteannehenry . com

I am also using a child theme.

Thank you,
Brigette

I hope you are well today and thank you for your question.

You can try achieving this by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Appearance -> Customize -> Additional CSS

/*Active drop menu color*/
.dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus {
  background-color:black !important;
  color:#d0b482;
}

/*hover menu color*/
.dropdown-menu> li> a:hover{
  background-color:#d0b482 !important;
}

/*active menu*/
.navbar-default .navbar-nav .current-menu-ancestor a.dropdown-toggle {
    color: #d0b482;

Best Regards,
Support

It changed the background which is good, but is there a code I can use to change the font color? When you hover over the tab the font becomes the same color I want to use for the background.

Hey there,
Thank you for keeping in touch

To do this add color:white; to the hover menu code as shown below.

/*hover menu color*/
.dropdown-menu> li> a:hover{
  background-color:#d0b482 !important;
  color:white; 
}

Best Regards,
Support

It worked perfectly! Thank you so much!

Hi! I tried to use this same code, adjusting to my color scheme, and put this in the CSS section of the Theme Options section of Divi. However, nothing changed. I am hoping to change the background color of the hover option on my primary menu. Does the word primary menu need to be added to the code versus “active menu?” Would love any help!

Hi there

“and put this in the CSS section of the Theme Options section of Divi.” - Divi? its not a Divi support, :slight_smile:

Okay have no idea what colorlib is. :smiley:

hi

Ok, nevermind :slight_smile:
I will close this case