BenthamLtd
asked on
Simple CSS drop-down menu positioning
Dear EE community,
I have an incredibly simple CSS drop-down menu. However, I'm having trouble putting text either side of it. Any ideas?
Thanks in advance.
So, in this example, I would like it to say "show <drop down menu here> posts" , if this is possible.
I have an incredibly simple CSS drop-down menu. However, I'm having trouble putting text either side of it. Any ideas?
Thanks in advance.
/* simple drop down menu - CSS */
#sddm
{ margin: 0;
padding: 0; display:inline;
z-index: 30;
}
#sddm li
{ list-style: none;
float: left;
}
#sddm li a
{
margin: 0 1px 0 0;
padding: 4px 10px;
width: 10px;
color:#FFFFFF;
text-align: center;
text-decoration: none;
}
#sddm li a:hover {
background:#000000;
color:#FFFFFF;
}
#sddm div {
position: absolute;
visibility: hidden;
margin: 0;
padding: 0;
background: #FFFFFF;
border: 1px solid #000000;
z-index: 2;
}
#sddm div a {
position: relative;
display: block;
margin: 0;
padding: 5px 10px;
width: auto;
white-space: nowrap;
text-align: left;
text-decoration: none;
background:#FFFFFF;
color:#000000;
z-index:2;
}
#sddm div a:hover {
background:#000000;
color: #FFF;
}
<!-- simple drop down menu - HTML -->
<!-- not bothered to include the javascript as this is a CSS issue but can if it is required -->
<div class="FeedAmount">
show <ul id="sddm"><li><a onmouseover="mopen('m1')" onmouseout="mclosetime();"><?php echo $limit.' ▼'; ?></a>
<div id="m1" onmouseover="mcancelclosetime();" onmouseout="mclosetime();">
<a href="<?php echo $_SERVER['PHP_SELF'].'?code='.$code.'&feed=25'; ?>">25</a>
<a href="<?php echo $_SERVER['PHP_SELF'].'?code='.$code.'&feed=50'; ?>">50</a></div></li></ul> posts
</div>
So, in this example, I would like it to say "show <drop down menu here> posts" , if this is possible.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
And yes, I'll take into consideration keyboard navigation.