WordPress.org

Support

Support » Themes and Templates » Hemingway » [Resolved] Centering Menu Under Header

[Resolved] Centering Menu Under Header

  • 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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Anders Norén

    @anlino

    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.

    Thanks Anders, that worked perfectly.

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

    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
    brett_troeger@yahoo.com
    (317)363-7632

    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.

    ***Edit:
    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.

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

    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.

    Thanks!

    Brett

    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;}

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Centering Menu Under Header’ is closed to new replies.
Skip to toolbar