Skip to content Skip to sidebar Skip to footer

Maintain 'hover' State On Parent Of Dropdown

I am using Bootstrap to build a navigation bar. How do I maintain the original link's hover state when I move the cursor onto to the dropdown element? So if I hover onto the dropd

Solution 1:

the hover styles are given for a tag so when you leave a so you leave a tag the hover styles are not taken

you will need to give hover styles for li

add this

ul.nav > li:hover {
  background:#eee;
}

demo - http://jsfiddle.net/DTcHh/3933/

Solution 2:

try this

nav>ul>li:hover{
    background:#eee;
}

demo:http://jsfiddle.net/DTcHh/3934/

Post a Comment for "Maintain 'hover' State On Parent Of Dropdown"