Dropdown Configuration
-
Hello! Quick question about dropdown lists in the header (specifically the “Categories” option). I would like to put a 2px border around the dropdown, and also highlight the different options a certain color. I’ve done both of those things with the below code, but I know there’s a better way.
The border is only appearing on hover, which means when I click the dropdown it fades in with a hover animation. I would like it to be there as soon as the dropdown is clicked, so that there is no fade-in animation.
Also, there seems to be a margin on the top, left, and bottom of the dropdown box, so that the hover isn’t selecting the entire area. I would like for those margins to be removed (if possible) so that there’s no white space on the edges when hovering over a list option. I’d also like to remove the padding in between those list options as well.
Here is the code. I tried li:hover instead of a:hover, but that didn’t work:
.menu-container ul.sub-menu {border-style: solid; border-width: 2px} .menu-container ul.sub-menu a:hover {background-color: var(--p-body)}
Thank you!
The page I need help with: [log in to see the link]
- The topic ‘Dropdown Configuration’ is closed to new replies.