开发者

CSS to Position Horizontal List

开发者 https://www.devze.com 2023-01-23 12:56 出处:网络
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?

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

精彩评论

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