html - Having trouble getting a smooth dropdown menu working with css -


hi guys i've been having trouble getting sub menu dropdown working css. i'm trying add smooth transition appearance @ moment menu doesn't display when hover. i'm sure it's small i'm missing can't seem figure out problem is. here's code:

#main-navigation ul.folder-child{     opacity: 0;     visibility: hidden;     -moz-transition: height 0.3s ease-in-out;     -ms-transition: height 0.3s ease-in-out;     -o-transition: height 0.3s ease-in-out;     -webkit-transition: height 0.3s ease-in-out;     transition: height 0.3s ease-in-out; }  #main-navigation li:hover ul.folder-child{     opacity: 1;     visibility: visible;     top: 50px; } 

i'd appreciate can offer. in advance!

you defining transition height , there no css rule defined height. here solution.

please note: transition of height property, need define height on normal , hover states.

ul.folder-child {     width: 180px;     height: 0;     overflow: hidden;     opacity: 0;     visibility: hidden;      position:absolute;     top: 100%;     left: 0;      transition: 0.4s ease-in-out;     -o-transition: 0.4s ease-in-out;     -webkit-transition: 0.4s ease-in-out; } #main-navigation li:hover > ul.folder-child {     height: 100px;     opacity: 1;     visibility: visible; } 

check out http://jsfiddle.net/logiccanvas/vwdvy/480/


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -