I put together a stylish drop-down menu based on some web examples, but my manager pointed out that it can be inconvenient to use because the menu closes when the mouse moves off of it. I've tried various workarounds as outlined here, but none have integrated smoothly with my existing code.
Any suggestions would be greatly appreciated! Below is a snippet of my CSS code and an example in HTML:
#cssmenu ul,
#cssmenu li,
#cssmenu span,
#cssmenu a {
padding: 0;
position: relative;
margin-left:auto;
margin-right:auto;
text-align:center;
font-family: "charles modern"
}
#cssmenu {
line-height: 1;
background: #ffffff;
margin-left:auto;
margin-right:auto;
text-align:center;
}
#cssmenu .padding{
display: block;
position: absolute;
z-index: 78;
...
<div id='cssmenu'>
<ul>
<li class='active has-sub'><center>Image 1</center></a>
<ul>
<li class='has-sub'><a href='#'><span>Add New Item</span></a></li>
<li class='has-sub'><a href='#'><span>View Item</span></a></li>
<li class='has-sub last'><a href='#'><span>Item With Sub-Items:</span></a>
<ul>
<li><a href='#'><span>User 1</span></a></li>
<li><a href='#'><span>User 2</span></a></li>
</ul>
</li>
</ul>
<li class='active has-sub'><center> Image 2</center></a>
<ul>
<li class='has-sub'><a href='#'><span>Add New Item</span></a></li>
<li class='has-sub'><a href='#'><span>View Item</span></a></li>
</ul>
</li>
</ul>
</div>