Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Centeriing unordred list

Status
Not open for further replies.

brk1221

MIS
Jan 29, 2002
230
US
How can I center an unordered list inside a div so that the bullets line up vertically?

Thanks
 
That should be happening automatically.

Can we see your code?


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
As Phil says, they will line up by default unless you are doing something to change this.

So, use a tool such as Firebug for Firefox, and look at the CSS hierarchy inspection of the list to find out what.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
I think I got it. I'm using this

<ul style="margin-left:75px">

to move the list in towards the center
 
Ah I see now what you mean.

That will work if you can guarantee that the middle of the container will always be at 75px inside it.

If not you could try to wrap the list in a DIV and center that div, making sure you set its text-align to left, to keep the items aligned correctly.






----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top