html - Why is the dropdown menu displaying without hovering over the main menu itself? -


for site http://www.baptisteyoga.com/

if move cursor bit below main menu, dropdown menu displays. why? it's bit annoying/unnecessary. want submenu appear when hover on main nav menu itself. e.g. only hovering on "programs" shows dropdown menu programs.

basically standard menu behaviour apply.

anyone know? thanks.

reason drop-down menu shows mouse not on menu because following css selector has opacity: 0; , on hover opacity: 1;, there no problem approach opacity doesn't hide element make transparent there not visible

header .large-menu .has-dropdown .sub-menu {     position: absolute;     left: 50%;     margin-left: -90px;     top: 50px;     height: 0;     width: 180px;     opacity: 0; <<<---here     -webkit-transition: .3s;     transition: .3s;     background: rgba(255,255,255,.9); }  header .large-menu .has-dropdown:hover .sub-menu {     height: auto;     opacity: 1; <<<---here     -webkit-transition: .3s;     transition: .3s; } 

so better approach hide element change opacity property visibility property below

header .large-menu .has-dropdown .sub-menu {     position: absolute;     left: 50%;     margin-left: -90px;     top: 50px;     height: 0;     width: 180px;     visibility: hidden;     -webkit-transition: .3s;     transition: .3s;     background: rgba(255,255,255,.9); }  header .large-menu .has-dropdown:hover .sub-menu {     height: auto;     -webkit-transition: .3s;     transition: .3s;     visibility: visible; } 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -