Enlaces actuales destacados
Frecuentes
Visto 59 equipos
0
I'm working on this Wordpress theme and I'm adding highlighted menus for the current pages using a darker color. The thing is, I figured out how to highlight the current link, but when I navigate to the "Sample Page" (which is the one who have sub-menus), all the submenus listed get highlited as well. And I don't want that. The URL -> http://experiencias.freeserver.me/
El CSS que agregué:
.nav .current-menu-item a{
color: #fff;
background-color:#bc3031;
}
I also tried this to see if it works, but it was not successful
.nav .sub-menu {
display:none;
}
1 Respuestas
3
prueba este
.nav .current-menu-item > a{
color: #fff;
background-color:#bc3031;
}
this will only highlight direct child not nested elements.
contestado el 28 de mayo de 14 a las 12:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas css wordpress highlight or haz tu propia pregunta.
Define to this .nav li:hover a{// css code } not used to this .nav a:hover{} - Rohit Azad Malik