Home › Forums › CSS › wanting submenu to dropdown vertically but they are floating left. Any suggestions?
- This topic is empty.
-
AuthorPosts
-
March 2, 2012 at 1:55 am #36940keithbMember
I built horizontal menu with css and one dropdown submenu to dropdown vertically when mouse hovers. Tried to add another submenu underneath first but it goes horizontal left.
css code is:
#content {
width:auto;
z-index:1;
background-color: #FFFFFF;
padding: 10px;
margin-top: 10px;
margin-right: auto;
margin-bottom: 10px;
margin-left: auto;
background-attachment: fixed;
color: #000;
}
#nav {
width: 100%;
float: left;
padding: 0;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
height: auto;
margin-top: 0;
margin-right: 0;
margin-bottom: 3em;
margin-left: 0;
list-style-image: none;
list-style-type: none;
}
#nav li
{
float: left;
}
#nav ul
{ float: none;
}
#nav li a {
display: block;
font-weight: bolder;
color: #4171b8;
font-family: “Monotype Corsiva”;
font-size: 20px;
height: 12px;
padding-top: 8px;
padding-right: 15px;
padding-bottom: 8px;
padding-left: 15px;
line-height: 12px;
text-transform: none;
text-align: center;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #ccc;
border-right-color: #ccc;
border-bottom-color: #ccc;
border-left-color: #ccc;
}
#nav li a:hover {
color: #73B5FD;
background-color: #f2f2f2;
font-weight: bold;
text-decoration: none;
}#nav ul {
position: absolute;
display: none;
z-index: 999;
background-color: #f2f2f2;
border: 1px solid #cecece;
}
#nav ul li a {
width: auto;
color: #2350b0;
font-weight: normal;
}
#nav li:hover ul {
display: block;
background-color: #f2f2f2;
}
What am I missing? -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.