Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Centering Bullets On A Centered List

Tags:

Example - http://jstn.info/html.html - link rot, example no longer available.

Notice the text is centered, but the bullet points themselves are not. How can I align the bullet points while keeping the text/list centered?

like image 422
CenterMe Avatar asked Mar 18 '11 03:03

CenterMe


People also ask

How do you center a bullet in a list in HTML?

You can use . parentOfUl{ text-align:center;} and then ul{ display:inline-block; }, and at last li{ text-align:center; }.

Should bullet points be centered?

Bulleted lists should be aligned so the bullets are aligned; otherwise the bullets' effectiveness is greatly reduced. Itemized lists in general should not be centered.

How do you center a centered element?

To just center the text inside an element, use text-align: center; This text is centered.


2 Answers

Please see https://stackoverflow.com/a/6558833/507421

ul {     list-style-position: inside; } 
like image 173
Davious Avatar answered Nov 07 '22 07:11

Davious


You asked the same question at Centering <UL> + Keeping <LI>'s Aligned and i already answered you.

Give your div a class name center. Assuming your div width is 200px, margin:0 auto will center and text-align:left will align the text to the left while maintaining its centering due to margin auto.

.center{     width:200px;     margin:0 auto;     text-align:left; } 

Check working example at http://jsfiddle.net/8mHeh/1/

like image 34
Hussein Avatar answered Nov 07 '22 09:11

Hussein