Center Text inside an li element inside an unordered list?

While you're assigning unequal padding values to the left and right of the li ( 0.75em and 2em respectively) the text can't be centred since you're forcing it off-centre with the padding If you amend the padding to: padding: 0.5em 1em ( 0.5em top and bottom 1em left and right) then it can be centred JS Fiddle demo of the above.

While you're assigning unequal padding values to the left and right of the li (0.75em and 2em respectively) the text can't be centred since you're forcing it off-centre with the padding. If you amend the padding to: padding: 0.5em 1em; (0.5em top and bottom, 1em left and right) then it can be centred. JS Fiddle demo of the above.

David : Thank you so much - I just spotted that! And I was trying to delete my question! Heh thank you again!

God that seams so obvious! – Rob Feb 28 at 21:45 @Rob: please don't delete questions that merited being asked in the first place. Especially questions that have attracted answers.

And, also, you're welcome; glad to have been of help. :) – David Thomas Feb 28 at 21:46.

If you want various sizes, then change the right or left padding property to be the same as the other one: padding: 0.5em 2em 0.5em 2em; or padding: 0.5em 0.75em 0.5em 0.75em; I've fiddled around with it a little: jsfiddle.net/Q32hn/ Don't forget to always close your ListItems.

BTW, I also removed the div and moved its styling to the UL – isotrope Feb 28 at 21:46 ah thanks also! Now closing the list items :D – Rob Feb 28 at 21:50.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions