Centering lists in Zurb Foundation

让人想犯罪 __ 提交于 2019-12-04 05:25:44

I think it is as simple as adding the following to your CSS file:

.inline-list{
     display: table;
     margin: 0 auto;
}

You can also remove the text-center class from your column div. I created a codepen, http://cdpn.io/rwJjf, as an example. I used Foundation 5.0.3 in my example, but I don't think it will matter.

Here are the resouces I used:

I hope that helps.

I couldn't get Adam's solution to work, but found that Foundation's .inline-list floats <li> to the left, so it's easier to just apply the CSS to a <ul class="text-center">:

ul {
 list-style-type:none;
}

li {
 display: inline-block;
}

Here it is working: http://cdpn.io/eGsky

As answered here: http://foundation.zurb.com/forum/posts/1096-centering-an-inline-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!