Centering top nav menu

  • Author
    Posts
  • #62364

    plmwanchai
    Member

    Can someone please tell me the CSS code to center the top nav menu?

    I have used many helpful suggestions from this forum to customize my site, but this is the only one I have not been able to complete

    The blog I need help with is harvesttestblog.wordpress.com.

    #62479

    thelukemcdonald
    Theme Author

    You can try the following CSS:

    .header-below {
        text-align: center;
    }
    
    .header-below .menu {
        text-align: left;
    }
    #62618

    plmwanchai
    Member

    Thanks, that worked for centering the blog topic tabs for the hero slider. Is there a way to center the page navigation menu at the top of the screen?

    #62671

    thelukemcdonald
    Theme Author

    If you don’t have the site search enabled, you can center the top navigation in a similar way.

    .top-nav {
      text-align: center;
    }
    
    .top-nav .menu {
      display: inline-block;
      float: none;
    }
    #62772

    plmwanchai
    Member

    Thanks. That worked fine.

The topic ‘Centering top nav menu’ is closed to new replies.