I'm trying to make it to where when I hover over the menu it transitions into dropping the submenu, but it is not working. I set the dropdown menu's height to 0px and when I hover I want it to be 650px so it looks like it's transitioning downwards. I need help, please.
<div class="dropdownform"> <div class="firstdropdown"> <div class="firstblock">Background</div> <div class="firstblock">Goals</div> <div class="firstblock">Achievments</div> </div> <div class="seconddropdown"> <div class="secondblock">Future</div> <div class="secondblock">College</div> <div class="secondblock">Hot 50 Flyer</div> </div> <div class="thirddropdown"> <div class="thirdblock">Letter To Freshmen</div> <div class="thirdblock">Letter of Recommendation</div> <div class="thirdblock">Scholarship Essay</div> </div> </div> .dropdownform { display: flex; flex-direction: row; position: relative; left: 5px; justify-content: space-between; margin-right: 712px; bottom: 35px; } .firstdropdown { position: relative; width: 250px; height: 0px; background-color: black; right: 2.5px; display: flex; flex-direction: column; justify-content: center; align-items: center; justify-content: space-around; border-bottom-right-radius: 35px; border-bottom-left-radius: 35px; border-top-right-radius: 12px; border-top-left-radius: 12px; overflow: hidden; } .seconddropdown { position: relative; width: 250px; height: 0px; background-color: black; right: .3px; display: flex; flex-direction: column; justify-content: center; align-items: center; justify-content: space-around; border-bottom-right-radius: 35px; border-bottom-left-radius: 35px; border-top-right-radius: 12px; border-top-left-radius: 12px; overflow: hidden; } .thirddropdown { position: relative; width: 250px; height: 0px; background-color: black; left: 1.8px; display: flex; flex-direction: column; justify-content: center; align-items: center; justify-content: space-around; border-bottom-right-radius: 35px; border-bottom-left-radius: 35px; border-top-right-radius: 12px; border-top-left-radius: 12px; overflow: hidden; } .firstblock { position: relative; width: 200px; height: 50px; background-color: white; border-radius: 35px; display: flex; justify-content: center; align-items: center; } .secondblock { position: relative; width: 200px; height: 50px; background-color: white; border-radius: 35px; display: flex; justify-content: center; align-items: center; } .thirdblock { position: relative; width: 200px; height: 50px; background-color: white; border-radius: 35px; display: flex; justify-content: center; align-items: center; } .first:hover + .firstdropdown { height: 650px; transition: .5s ease-in-out; } Here's a reference image: image
I know this might be a duplicate but I didn't find anything that fit my situation.
.firstbut there's no class named.first, do we miss some code or is ur code wrong?www.jsfiddle.net