WordPress.org

Ready to get started?Download WordPress

Forums

Hemingway
[resolved] Centering Menu Under Header (8 posts)

  1. apcgallery
    Member
    Posted 4 months 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 Norén
    Member
    Theme Author

    Posted 4 months 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
    Member
    Posted 4 months ago #

    Thanks Anders, that worked perfectly.

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

  4. sirbrettthomas
    Member
    Posted 3 months 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
    brett_troeger@yahoo.com
    (317)363-7632

  5. apcgallery
    Member
    Posted 3 months 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.

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

  6. sirbrettthomas
    Member
    Posted 3 months ago #

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

  7. sirbrettthomas
    Member
    Posted 3 months 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.

    Thanks!

    Brett

  8. apcgallery
    Member
    Posted 3 months 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;}

Reply

You must log in to post.

About this Theme

About this Topic