居中< UL> +保持< LI>的对齐 [英] Centering <UL> + Keeping <LI>'s Aligned
问题描述
我的问题:
http://i56.tinypic.com/ff3jmo.png
项目符号不会对齐。
我要去的是文本对齐:集中ul所在的班级。我可以调整项目符号吗?
编辑:嘿,大家,只是想澄清一下。我希望实际的项目符合点。目前文字是对齐的,但不是要点。
- T ext
- T ext
- T ext
- T ext
我想要的地方
< ul>
放置在< div>
以及中心设置为特定宽度并使用 margin-left:auto;
和 margin-right:auto
。
因此:
< div style =width:25% ; margin-left:auto; margin-right:auto;>
< ul>
< li>列表项目1< / li>
< li>列表项目2< / li>
< / ul>
< / div>
My problem: http://i56.tinypic.com/ff3jmo.png
The bullet points aren't aligned.
All I'm going is text-align:center'ing the class in which the ul resides. Can I align the bullet points?
EDIT: Hey guys, just want to try and clarify. I want the actual bullet points aligned. Currently the text is aligned, but not the bullet points.
- T e x t
- T e x t
- T e x t
- T e x t
Where as I want
- Text
- Text
- Text
- (Bullet points aligned, text centered)
text-align: center
isn't to be used for this purpose. You should probably put the <ul>
in a <div>
and center that by setting it to a certain width and using margin-left: auto;
and margin-right: auto
.
So:
<div style="width: 25%; margin-left: auto; margin-right: auto;">
<ul>
<li>List item 1</li>
<li>List item 2</li>
</ul>
</div>
这篇关于居中< UL> +保持< LI>的对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!