1

I'm trying to center the text in my nav bar (categories).

I've tried text-align and various other options but nothing seems to be working.

My site is www.lifemaxuk.co.uk

Can someone have a look and please help as this is driving me mad!

Thanks

  • Maybe this answer can help you: stackoverflow.com/questions/2865380/… – Robin Mar 11 '15 at 15:45
  • Do you want to remove the second line or what is the purpose? – Klettseb Mar 11 '15 at 15:53
  • I want to center all the text so that the two categories on the second line are in the middle. – williampatey Mar 11 '15 at 16:30
3

The a-element is already centered in the li-element. So if you want to center the text in your blue nav you should change the css like this:

ul {
text-align:center;
}

li a,
li {
float:none;
display:inline;
text-align:center;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.