Yannick
Yannick

Reputation: 3653

CSS to Position Horizontal List

I'm trying to do a horizontal list using the style type below but when using display: inline the square wont show. Any suggestions?

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

Upvotes: 0

Views: 4043

Answers (2)

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114347

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;}

Upvotes: 4

Breezer
Breezer

Reputation: 10490

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

Upvotes: 2

Related Questions