css - 如何使 Zurb Foundation 顶部导航栏居中?

标签 css navigation center zurb-foundation nav

my site 上的顶部栏导航像这样左对齐:

| Home | aveoTSD | Silent Nite          |

我想像这样将顶部导航栏居中:

|          Home | aveoTSD | Silent Nite          |

它与带有“Example”文本的红色条完全一样居中。

这里是 my css .

最佳答案

您可以通过将此添加到您的 CSS 来实现(最好删除冲突的样式):

.top-bar-section ul {display: table; margin: 0 auto;}
.top-bar-section ul li {display: table-cell;}

关于css - 如何使 Zurb Foundation 顶部导航栏居中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16866734/

相关文章:

twitter-bootstrap - Bootstrap 行容器的中心内容

html - 使用响应式高度/滚动将弹出模式居中

css - 来自 Angular 6 全局样式表的 TinyMCE content_css

ios - swift WebView 在导航按钮后打开不需要的浏览器

php - 如何在opencart的导航菜单中添加信息链接?

android - ActionBar Logo 居中,Action 项目位于两侧

html - 响应式地调整 SVG 图标和文本的大小

jquery - 立即将父级 div 包裹在 float 的子级周围

css - 使用 CSS :after pseudo-selector to display directional carets in Bootstrap 3 input-groups

html - 无法指定悬停时显示的彩色 div 的宽度