有没有人建议为什么这个列表不会水平显示和居中。
当 li 项目实际显示为内联时,我确定居中如下......
谢谢
HTML:
<div id="nav">
<div class="navtable">
<ul id="nav1">
<li><img src="images/kranznav2.png" alt="kranz"/><a href="index.php">COMPETE</a></li>
<li><img src="images/thumbnav2.png" alt="thumb"/><a href="score.php">SCORE</a></li>
<div id="logolist"><li><a href="index.php"><img src="images/logorz.png" width="175em" /></a></li></div>
<li><img src="images/bagnav2.png" alt="bag"/><a href="index.php">SHOP</a></li>
<li><img src="images/morenav2.png" alt="more"/><a href="index.php">MORE</a></li>
</ul>
</div>
</div>
CSS:
#nav {
position:relative;
background:#ffffff;
width:100%;
height:0.2em:
overflow:visible;
margin-top:-2em;
font-family:Cusmyrb;
font-size:75%;
}
#logolist {
position:absolute;
padding-top:2em;
width:250px;
left:50%;
margin-left:-100px;
margin-top:-7%;
}
#nav a {
display:block;
margin-right:0% auto;
padding-left:0% auto;
color:#343234;
text-decoration:none;
}
.navtable {
display:table;
margin:0 auto;
}
ul#nav1 {
min-width:700px;
list-style:none;
padding-top:20px;
}
ul#nav1 li {
display:inline;
}