despite the correct php code, any CSS might stop the dropdown from working, if it is not implemented in your theme.
have you checked if the second level menu items are showing in the html in the browser?
what theme are you using?
http://codex.ww.wp.xz.cn/Forum_Welcome#Include_as_Much_Information_as_Possible
I played with the css and only when i choose display-block i can see the sub-menu in the browser. actually now, The sub-menu is shown automatically and i want it to be only when mouse hover. how can i do that?
this is the css code:
.menu {
height: 38px;
background-color: #0F0F0F;
}
.menu ul {
display: inline-block;
margin-left: 0px;
width: 100%}
.menu ul li {
float: left;
margin-right: 0px;
}
.menu li {
display: inline;
float: left;
position: relative;
z-index: 9999;
}
.menu ul li>a:hover {
color: #c00;
}
.menu ul li.current-menu-item>a, .left_bar_list li.current-menu-item>a {
background-color: #;
color: #fff;
text-shadow: none;
border-bottom: 2px solid #3984D8;
}
.left_bar_list li.current-menu-item>a {
border-right: 5px solid #bd1e2c;
color: #fff;
}
.menu ul li a {
border-left: 0px solid #f3f3f3;
color: #fff;
display: block;
padding: 9px 16px;
text-transform: uppercase;
font: 16px/20px 'Oswald', sans-serif;
}
.menu ul li a:hover {
background-color: #3a3a3a;
color: #fff;
text-shadow: none;
}
.menu ul ul {
background: none repeat scroll 0 0 white;
display: none;
left: 1px;
padding: 0;
position: absolute;
top: 38px;
}
.menu li ul.sub-menu {
width: 250px!important;
color: #fff;
display: block;
padding: 9px 16px;
text-transform: uppercase;
font: 16px/20px 'Oswald', sans-serif;
}
.menu li ul.sub-menu li {
float: left;
width: 125px;
}
._menu {
background-color: #3a3a3a;
}
.menu li ul.sub-menu li a:hover {
color: #FFF;
}
._menu ul li {
background: url("images/bullets_white.png") no-repeat scroll right 16px transparent;
float: left;
padding: 9px 14px;
}
.menu li ul.sub-menu li a {
border-bottom: 1px solid #eaeaea;
border-left: 1px solid #eaeaea;
color: #666;
font-weight: normal;
padding: 8px;
text-transform: uppercase;
font: 11px Arial, Helvetica, sans-serif!important;
}
._menu ul li.last {
background: none repeat scroll 0 0 transparent;
}
.navigation ul.menu li {
position: relative;
}
.navigation ul.menu li span {
color: #00b9f5;
}
.navigation ul.menu li span.subhover {
cursor: pointer;
}
.navigation ul.menu li ul.sub-menu {
position: absolute;
left: -1px;
top: 37px;
display: none;
padding: 0;
margin: 0;
}
.navigation ul.menu li ul.sub-menu li {
width: 184px;
height: 27px;
line-height: 27px;
text-indent: 14px;
font-size: 12px;
font-weight: normal;
background: url("images/left-menu-bg.png") no-repeat left top;
text-align: left;
padding: 0;
margin: 0;
}
You might want to try something like:
.navigation ul.menu li:hover ul.sub-menu
{here goes your sub-menu positioning code.}
In other words, have your sub-menu appear on when its parent is in the hover state.