开发者

CSS to Position Horizontal List

I'm trying to do a horizontal list using the style开发者_StackOverflow中文版 type below but when using display: inline the square wont show. Any suggestions?

.vertical li {display: inline; list-style-type: square; padding-right: 5px;}


You need to style both the list and the list elements. Use float, not display:inline.

ul {list-style-type: square;}
li {float:left;margin-left:25px;}


use float:left; the you protect yourself from getting unexpected results that's inherited with diffrent objects

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜