我如何居中Zurb Foundation顶栏导航? [英] How do I center the Zurb Foundation top bar nav?

查看:69
本文介绍了我如何居中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顶栏导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆