Nav Source link color background

In Nav (Source) I need to have the background active on the first link that appears in the menu and when you hover over it with the mouse, a different color from the rest of the other links.
This different color (green example) must be exclusively for the first link in the menu, the other links will have red.

Is it possible to do this with custom css inserted into Coder?

?? .navbar .ml-menu > li:first-child >. ??

.navbar li:nth-child(1):hover {
    background-color:#3B8B23 !important;
}
.navbar li:first-child:hover {
    background-color:#3B8B23 !important;
}

The problem is that it also expands to the first of the submenus… I only want the first of the menu

Good job! you are getting close with that. If you tweak it to the following i think it should do what you need:

.navbar .ml-menu>li:first-child:hover {
    background-color:#3B8B23 !important;
}
1 Like
.navbar>ul>li:first-child:hover {
    background-color:#3B8B23 !important;
}

risolto

1 Like

Ha! we both posted at the same time. Glad you got it sorted 👍

2 Likes

But I trust you Maestro, so I enter your code.
Thanks Stuart

1 Like