I\'m trying to create a dropdown submenu, but mine isn\'t lining up with the men
ID: 3545166 • Letter: I
Question
I'm trying to create a dropdown submenu, but mine isn't lining up with the menu nor is it the same width. I'm just try to to get the submenu to dropdown below the parent and be the same width. this is my css code so far:
#nav
{
padding:0;
}
#nav li
{
display: inline;
position: relative;
}
#nav li a
{
font-family:Arial;
font-size:12px;
text-decoration: none;
float:left;
padding:10px;
background-color: #333333;
color:#ffffff;
border-bottom:1px;
border-bottom-color:#000000;
border-bottom-style:solid;
margin: auto;
}
#nav li a:hover
{
background-color:#4A8ACC;
padding-bottom:12px;
border-bottom:2px;
border-bottom-color:#000000;
border-bottom-style:solid;
margin:-1px;
}
#nav ul.sub-menu {
list-style: none;
display: none;
right: 7px;
padding: 10px;
position: relative;
top: 20px;
z-index: 90;
}
#nav ul.sub-menu li {
text-align: left;
float:none;
}
#nav li:hover ul.sub-menu {
display: block;
position: absolute;
top: 26px;
}
#wrapper{
margin: 0 auto;
width: 90%;
}
*{
margin:0;
padding:0;
vertical-align: middle;
}
Explanation / Answer
HERE IS THE CORRECT CODE