Search code examples
cssmousehover

Show another div while li hover


I have two divs the first one has full of Menu li elements and the second one has submenu. When I hover the menu li it should show the next div with CSS

li:hover{
  //Display Submenu
}

Fiddle here


Solution

  • https://jsfiddle.net/yv6pyk7a/

    .secondDiv:hover {
        display:block;  
    }
    .secondDiv > li:hover {
        background: #aaa;
        cursor: pointer;
    }
    

    Just check this one. Hope it solve the problem.