如何使用CSS或HTML居中导航栏? [英] How to center a navigation bar with CSS or HTML?
本文介绍了如何使用CSS或HTML居中导航栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在此网页上将导航栏居中。
I am having difficulty with centering the navigation bar on this page.
我试过 nav {margin:0 auto;
I tried nav { margin: 0 auto; }
and a bunch of other ways, but I still can't center it.
推荐答案
#nav ul {
display: inline-block;
list-style-type: none;
}
它应该可以工作,我在你的网站测试了它。
It should work, I tested it in your site.
这篇关于如何使用CSS或HTML居中导航栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文