WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Clean Retina
[resolved] How to center the text in the main nav bar? (6 posts)

  1. julesjunction
    Member
    Posted 2 years ago #

    Hi, liking the theme thanks, easy to use and set up as well as looking beautiful.

    I am trying to center the text of my main navigation bar because I think it will look better for the site I am working on.

    I have used the following CSS to try to center the menu options:
    #access ul{margin: 0 auto; width: 669px; }

    This has centered the menu options but they look a bit bunched up to me. What I'm trying to do is center the menu options but also space them out across the nav bar so they look better.

    I feel that either I'm nearly there or there's loads more to do to get it to work.

    Thanks for any help you can give,
    Jules

  2. Maria Antonietta Perna
    Member
    Posted 2 years ago #

    Hi, you could try:

    #access li {
      margin-right: 8px; /* adjust as needed */
    }

    This should space out the menu items.

  3. julesjunction
    Member
    Posted 2 years ago #

    Thank you @antonietta456.

    Your suggestion has helped spread them out a bit. They aren't quite centered but it is better than it was :)

  4. Maria Antonietta Perna
    Member
    Posted 2 years ago #

    Also, after what you've just done, add this new rule:

    #access li:last-child {
      margin-right: 0;
    }

    This should decrease the right spacing to the last menu item and should result in a more centered menu bar.

  5. julesjunction
    Member
    Posted 2 years ago #

    Thank you, works fine :)

  6. Maria Antonietta Perna
    Member
    Posted 2 years ago #

    Great, you're welcome!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags