Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background color of menu item when Dropdown menu is still active

I would like to simulate as if the menu item is connected to the dropdown menu whenever this is active by changing the background color.

How can I change the background of the "Catalogo" menu item whenever the dropdown menu is active?

I have been able to get the background color to change as I hover over the menu item using this code:

.site-nav__link--button:focus, .site-nav__link--button:hover {
  background-color: #B8A899;}

This is my website.

I am extremely new to CSS/HTML, and I have no idea what the relevant code would be to produce a minimal working example.

Can someone point me into the right direction? Where could I modify my code to produce the desired behaviour?

EDIT: This is the effect I want to achieve, and I want the background color to remain as I move the mouse cursor through the dropdown menu: enter image description here

like image 492
VelasArtes Avatar asked Jan 31 '26 05:01

VelasArtes


1 Answers

Add this appeal.

li.site-nav--has-dropdown:hover {
     background-color: #B8A899;
}
like image 193
s.kuznetsov Avatar answered Feb 01 '26 20:02

s.kuznetsov