Apr
27

How do you center a horizontal ul so the bullets align?(css)?

By

Can’t seem to figure it out. Every time I center the list the bullets don’t align. Here is the css and html:

.list li{
text-align: center;
}

Categories : Grooming Tools

4 Comments

1

The bullets are tied to the li, so you can’t center-align the li without center-aligning the bullets. You can center-align the ul though and then left-align the li tags within it. That might give you what you want.

2

The only way I can think of to do so is to align it to the left and put a padding of so many pixels. It will move the text over while keeping it aligned.

3

margin: auto;

put that in your body

4

Since you are using CSS, create a wrapper/container and center the wrapper. Inside the wrapper, keep the ul left.

http://keepitsimplehtml.com

Good Luck

Leave a Comment