How do I center the Zurb Foundation top bar nav?(如何使 Zurb Foundation 顶部栏导航居中?)
问题描述
我的网站上的顶部导航栏左对齐如下:
The top bar nav on my site is left aligned like this:
| Home | aveoTSD | Silent Nite |
我想像这样将顶部栏导航居中:
I would like to center the top bar nav like this:
| Home | aveoTSD | Silent Nite |
将它与带有示例"文本的红色条完全一样居中.
Center it exactly like the red bar with "Example" text.
这里是我的css.
推荐答案
您可以通过将其添加到您的 CSS 来实现(最好删除冲突的样式):
You can do it by adding this to your CSS (and preferably removing conflicting styles):
.top-bar-section ul {display: table; margin: 0 auto;}
.top-bar-section ul li {display: table-cell;}
这篇关于如何使 Zurb Foundation 顶部栏导航居中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使 Zurb Foundation 顶部栏导航居中?


基础教程推荐
- Bootstrap 模态出现在背景下 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01