I am struggling with a CSS menu that features drop downs. While I have experience building drop down menus and working with CSS hover effects in the past, this particular menu is proving to be quite challenging.
After researching similar CSS :hover and CSS menu issues on Stack Overflow, it seems like the problem mainly lies in getting the CSS elements in the correct order. However, I am still unable to pinpoint where I am going wrong with the ordering.
Below is a snippet of my CSS code:
.megamenu>li>.megapanel{position:absolute;display:none;background:#ffffff;box-shadow: 0px 2px 4px #777; width:100.2%;top:33px;left:0px;z-index:99;padding:20px 30px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
.megamenu>li>.megapanel:hover{display:block;}
I have experimented with different combinations of CSS classes, as well as solely using .megapanel and .megapanel:hover.
However, whenever I refresh my browser and hover over the menu, nothing happens. Even when I inspect the dev tools in Chrome, the :hover CSS does not show up in the CSS list. I am completely stuck.
Here is a snippet of the affected HTML code:
<ul class="megamenu skyblue">
<li><a class="color1" href="index.php">Home</a></li>
<li class="grid"><a class="color2" href="#">Our Dogs</a>
<div class="megapanel">
<div class="row">
<div class="col1">
<div class="h_nav">
<ul>
<li><a href="sires.php">Males</a></li>
<li><a href="toy-females.php">Toy Females</a></li>
<li><a href="females-mini.php">Mini Females</a></li>
<li><a href="upcoming.php">Upcoming</a></li>
<li><a href="ref.php">Reference</a></li>
<li><a href="http://www.colorcountryaussies.com/pedigrees/pp_search.htm" target="_blank">Pedigrees</a></li>
<li><a href="past.php">Past Puppies</a></li>
</ul>
</div>
</div></div></div></li>
I am aware that the HTML snippet is incomplete, as my menu is quite long and I didn't want to overwhelm the post with unnecessary code. I'm confident that the solution is straightforward, yet I seem to be missing it.