我正在使用导航栏
list-style-type: none for ul li ul li
不管用。
这是我的CSS代码:
nav{
height: 32px;
line-height: 32px;
background: #3B5998;
padding: 0 20px 0 300px;
}
nav a{
list-style-type: none !important;
}
nav h1{
position: absolute;
text-indent:-9999px;
}
nav ul, nav ul li{
margin-left: 20px;
margin-right: 20px;
padding: 0;
}
nav ul li{
float: left;
display: block;
position: relative;
left: 0px;
}
nav ul li a:link, a:visited{
font-size: 13px;
font-style:normal;
font-weight:300;
line-height:18px;
letter-spacing:0px;
color: #CCCCCC;
text-decoration: none;
background-position:0 13px;
}
nav ul li a:hover{
color:#FFFFFF;
background-image:url(../images/link_bg.png);
background-repeat:repeat-x;
background-position:0 13px;
}
nav ul li ul{
position: absolute;
width: 160px;
left: -20px;
background: #FFF;
padding: 0px;
border: solid 1px #2E4B88;
border-top: none;
line-height: 26px;
z-index: 1000;
list-style-type: none;
}
nav ul li ul li{
float: none;
display: block;
margin: 0px;
padding: 0px;
}
nav ul li ul li a:link, nav ul li ul li a:visited{
color: #444;
font-size: 11px;
font-weight: bold;
text-decoration: none;
padding: 0px;
clear: both;
border-bottom: solid 1px #DEDEDE;
}
nav ul li ul li a:hover{
color: #3B5998;
}
和html代码:
<nav>
<ul>
<li><a href="./introduction/">Introduction</a>
<ul class="submenu">
<li><a href="./introduction/ykrf/">YKRF Leadership Forum</a></li>
<li><a href="./introduction/yonsei/">Yonsei University</a></li>
<li><a href="./introduction/keio/">Keio University</a></li>
<li><a href="./introduction/rikkyo/">Rikkyo University</a></li>
<li><a href="./introduction/fudan/">Fudan University</a></li>
</ul>
</li>
<li><a href="./forums/">Past Forums</a>
<ul>
<li><a href="./forumbefore2008/">Before 2008</a></li>
<li><a href="./forum2008/">2008 Shanghai</a></li>
<li><a href="./forum2009/">2009 Seoul</a></li>
<li><a href="./forum2010/">2010 Tokyo</a></li>
<li><a href="./forum2011/">2011 Fudan</a></li>
<li><a href="./forum2012/">2012 Seoul</a></li>
</ul>
</li>
</ul>
</nav>
因此,在 ul with class 子菜单中,所有 li 的前面都有 1.。即使我为 ul li ul li 设置了 list-style-type: none。
我应该在哪里设置 css 属性以删除 1. ?