我只是似乎无法想出解决办法。我试过文本对齐:中心; ,显示:inline-block的多,但我只是无法弄清楚如何将#菜单底部导航中心内我的导航
I just can't seem to figure this out. I've tried text-align: center; , display: inline-block and more but I just cant figure out how to center my navigation within the #menu-bottom-nav.
CSS
#menu-bottom-nav { width: 600px; height: 70px; margin: 0px auto;}
#menu-bottom-nav li { list-style-type: none; float: left; margin-right: 20px;}
任何帮助是AP preciated。
Any help is appreciated.
尝试了这一点:
<!DOCTYPE>
<html>
<head>
<title>Test</title>
<style type="text/css">
#menu-bottom-nav {
margin: 0;
padding: 0;
width: 600px;
text-align: center;
border: 1px solid #000;
}
#menu-bottom-nav li {
list-style-type: none;
margin-right: 20px;
border: 1px solid #ff0000;
display: inline-block;
*display: inline;
zoom: 1;
}
</style>
</head>
<body>
<ul id="menu-bottom-nav">
<li>Test</li>
<li>Test2</li>
<li>Test3</li>
</ul>
</body>
</html>