Hi, I’m trying to edit the secondary menu appearance but cannot find the correct CSS to change anything with it. I’ve been digging through and nothing I try seems to change.
Overview of what I want:
Add a border to the drop down, round off corners and change the hover colour.
Any help with the above would be appreciated.
This topic was modified 2 years, 8 months ago by sledzuk.
The page I need help with: [log in to see the link]
Got it! I understand you are looking for the right selectors to edit the secondary menu with CSS. Are you creating something like this?
To modify the appearance of the secondary menu, you can use the following CSS code (Appearance → Additional CSS):
/* Add rounded corners to menu */
ul.sub-menu, ul.sub-menu li.menu-item:last-child {
border-bottom-left-radius: .5rem;
border-bottom-right-radius: .5rem;
}
/* Add border to the sub-menu items */
ul.sub-menu li.menu-item {
border-bottom: 1px solid var(--wp--preset--color--black);
}
/* Adjust background color to menu items on hover */
ul.sub-menu li.menu-item:hover {
background-color: var(--wp--preset--color--cyan-bluish-gray);
}
You can replace var(--wp--preset--color--black) and var(--wp--preset--color--cyan-bluish-gray) with your preferred colors. Use a hex color picker like this one here: HTML Color Picker, by W3Schools
If these changes don’t take effect, append !important to enforce them. For example: