Apr
27
How do you center a horizontal ul so the bullets align?(css)?
ByCan’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;
}
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;
}
4 Comments
April 27th, 2010 at 10:47 pm
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.
April 27th, 2010 at 11:24 pm
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.
April 28th, 2010 at 12:09 am
margin: auto;
put that in your body
April 28th, 2010 at 12:45 am
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