I'm currently working on a couple of drop-down menus on the following page: http://icao.tungsten.hireserve-test.com/home.html
Originally, we only had one of these menus but our client has since changed their template and we now need to implement two drop-down menus. Previously this was done with jQuery hover() events which fired show() and hide() but now I have replaced this with CSS.
li.dynamic-children{
position: relative
}
li.dynamic-children ul{
display: none;
position: absolute;
}
li.dynamic-children:hover ul{
display: block;
left: -1px;
top: 18px;
position: absolute;
z-index: 100
}
li.dynamic-children:hover ul span{
width: 100%
}
The dropdown menu is displayed successfully on hover however because it is done with CSS there does not appear to be any way of ensuring that the drop-down persists when the user moves off of the link which triggers the drop-down. This means that the user cannot select any of the items in the dropdown menu rendering it useless.
Do any of you have any ideas as to how I can force the menu to persist long enough for users to be able to make a selection for the drop-down menus?
EDIT:
Based upon some of the code provided below I have now included the following CSS rules:
.s4-tn .horizontal ul.dynamic {
background-color: #ECF4FC;
border-top:4px solid #003D78;
margin: 0;
width: 255px;
z-index: 1000 !important;
}
.menu-horizontal li.static, .menu-horizontal a.static, .menu-horizontal span.static {
float: left;
padding-bottom: 5px;
}
These rules cause the menu to persist however in IE7 the drop-down menu now falls behind other elements on the page rendering it still useless in this browser. I have tried numerous z-index fixes to no avail.