我正在创建一个 Twitter Bootstrap 主导航和子导航,主导航上有一个下拉菜单。问题是我永远无法让下拉菜单显示在子导航上方。这是HTML:
<div class="mainnav navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Settings
</a>
<ul class="dropdown-menu">
<li><a>test 1</a></li>
<li><a>test 2</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="subnav navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li><a>foo</a></li>
<li><a>bar</a></li>
</ul>
</div>
</div>
</div>
CSS:
.subnav {
top: 40px;
}
.mainnav .dropdown-menu {
// how can I show this menu above the subnav???
}
</p>