我的下拉菜单位于下一个 div 元素下,有关如何解决此问题的任何想法?
CSS:
.cf ul li{
float:left;
margin: 0;
padding: 0;
list-style:none;
font-family:"open sans", sans-serif;
}
.cf li a {
display:block;
padding:0 1em;
line-height: 2.5em;
color:#FFFFFF;
}
.cf li a:hover {
background-color:#ffa627;
}
li{
position:relative;
}
ul.submenu {
float:none;
background: #222;
position:absolute;
left:-9000em;
}
.topmenu li:hover ul{
left:0;
}
ul.submenu li {
float:none;
}
#nav-bar nav {
background-color: #222;
}
.cf:before,
.cf:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.cf:after {
clear: both;
}
/**
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.cf {
*zoom: 1;
.callout1 {
background-color: #fff;
text-align: center;
padding: 20px 0px;
width:319px;
text-decoration:none;
font-family: 'Open Sans', sans-serif;
color:#222;
border-right: 1px solid #EFEFEF;
float:left;
}
HTML:
<div id="nav-bar" class="cf">
<nav class="cf">
<ul class="topmenu">
<li class="hometop"><a href="#" class="hometop">Home</a></li>
<li ><a href="#" >Catagory</a>
<ul class="submenu">
<li><a href="#">Blah Blah</a></li>
<li><a href="#">Blah UGG</a></li>
</ul>
</li>
<li ><a href="#">About</a></li>
<li ><a href="#">How To Order</a></li>
</ul>
</nav>
</div>
<div id="extra-info">
<nav>
<ul>
<li><a href="#" class="callout1">Do You Have Any Questions? <br>Contact Us</a></li>
第一次做一个网站,把我的头发拉出来,现在整天都在想这个,请你们中的一个快速开发向导帮助我!
已编辑:已粘贴“您有任何问题与我们联系”div html 及其 css。