+ 2

hover in child-element not working ..please help me

<!DOCTYPE html> <html> <head> <title></title> <style> *{ margin: 0; } .individual { display: inline-block; } ul li { list-style: none } .parent-element { border: 2px solid black; } .child-element { display: none; } /* hover drop down */ .parent-elemet:hover .child-element { display: block; } </style> </head> <body> <div class="container"> <div class="dropdown-started"> <div class="individual"> <ul> <div class="parent-element"> <li>test 1</li> </div> <div class="child-element"> <ul> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> </ul> </div> </ul> </div> <div class="individual"> <ul> <div class="parent-element"> <li>test 1</li> </div> <div class="child-element"> <ul> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> </ul> </div> </ul> </div> <div class="individual"> <ul> <div class="parent-element"> <li>test 1</li> </div> <div class="child-element"> <ul> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> </ul> </div> </ul> </div> <div class="individual"> <ul> <div class="parent-element"> <li>test 1</li> </div> <div class="child-element"> <ul> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> <li> part 1</li> </ul> </div> </ul> </div> </div> </div> </body> </html>

17th Dec 2020, 12:29 PM
Abhishek Topno
Abhishek Topno - avatar
1 Answer
+ 2
Bro the answer is simple you are having typo in parent-element. /* hover drop down*/ . parent-element:hover...... Correct this thing and it will work like charm. Do upvote my answer if was helpful. Cheers!
17th Dec 2020, 6:08 PM
Ddhruv
Ddhruv - avatar