[resolved] Centering Menu Under Header (8 posts)

  1. apcgallery
    Posted 2 years ago #

    The site title and tagline are centered in the black box in the header, but I would also like to center the menu li's.

    I've tried to find a solution by tinkering around in Google Chrome's "Inspect Element" HTML/CSS viewer/editor, but I get the feeling it's more complicated than just adding "text-align:center" or "margin: 0 auto" to a class.

    I'm stumped! Can you help?

  2. Anders Noren
    Theme Author

    Posted 2 years ago #

    Hi apcgallery,

    1) Add the CSS code ul.blog-menu { text-align: center; }
    2) Go to line 287, containing .blog-menu > li { float: left; }. Remove float: left; and add display: inline-block;.
    3) Update the file, and your menu should be centered.

    Let me know if it works for you.

  3. apcgallery
    Posted 2 years ago #

    Thanks Anders, that worked perfectly.

    I enjoy using your theme & I
    appreciate all of your hard work!

  4. sirbrettthomas
    Posted 2 years ago #

    Mr. Anders Noren,

    I'm also trying to center my menu, but I can't seem to figure it out. I've tried following your directions above, but clearly I'm doing something incorrectly. I love the Hemingway Theme, it's gorgeous, but I think my website would look better with a centered menu.

    I could really use your assistance, even if that means you log onto my site for me and fix it yourself.

    Thanks so much,

    Brett Troeger

  5. apcgallery
    Posted 2 years ago #

    Hey Brett,

    I can actually help you out. First, what version of WordPress are you using? If you're using version 3.8, follow the instructions below:

    In your site's Dashboard, click Edit CSS in the Appearance section.

    Paste this code anywhere in the box:

    ul.blog-menu {
    	text-align: center;
    .blog-menu > li {
    	float: none;
    	display: inline-block;

    Click Save Stylesheet. Your Menu should now be centered.

    PS: You may not want to include your email and phone number in future posts- It's practically an open invitation for spammers/solicitors.

    The Edit CSS option mentioned above may only be available with the Jetpack Plugin installed.

    This feature of Jetpack allows you to make CSS changes without modifying the theme itself. Any changes made to a theme file (accessible by "Editor" in the "Appearance" section, or via FTP) will be lost when you update the theme. Changes made with the Edit CSS option will remain.

    Your other option is to create a Child Theme. This will require a little more technical know-how, and will likely take you longer.

  6. sirbrettthomas
    Posted 2 years ago #

    It worked!
    Thanks you!
    And thanks for the security advice as well.

  7. sirbrettthomas
    Posted 2 years ago #

    Hello again guys!

    I have another Hemingway-Rewritten issue that maybe you can help me with. Is there a way to hide the page titles from appearing on the actual pages themselves? I like the titles to remain on the menu of course, but I was hoping there might be a way for me to erase titles from showing up on the top of each respected page.



  8. apcgallery
    Posted 2 years ago #

    This piece of CSS will remove all Page and Post Titles,
    and it will not remove them from your menu(s).

    You place it in the same location as the previous code:

    /* Remove Page and Post Titles */
    .post-title, .post-title a {display: none;}

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic