• Resolved MazterRic

    (@mazterric)


    Hi there.

    How do I make it so that my header logo and menu bar are both centered? By default, smaller header logo seems to align to left and menu bar (options) align to the right.

    Maybe a better way to ask is where would I be able to find the template to edit? I saw the custom CSS option, but wasn’t sure how to go about applying that.

    Thank you!

Viewing 7 replies - 16 through 22 (of 22 total)
  • I know it might be annoying, but it still does not work: https://skepticdog.com/

    I have written this in my Custom CSS:

    /* This is for centering logo and menu*/
    #page .container header hgroup {
    float: none;
    margin: 0 auto;
    }
    
    .site-header img, img.size-full {
    display: block;
    margin: 0 auto;
    }
    
    .main-navigation {
    float: none !important;
    margin: 0 auto;
    width: 100%;
    height: 40px;
    }
    
    .menu-main-menu-container {
      text-align: center;
    width: 100%;
    }
    
    .main-navigation ul {
      display: inline-block;
    }
    
    .main-navigation li {
      display: table;
      margin: 0 auto;
    }

    Thank you very much for the help!

    GabiClayton

    (@gabiclayton)

    I am having the same problem centering the menu and logo. When I put andracuamic code above in Custom CSS it centered the logo (yay!) but not the menu. See https://olympiafriends.org/

    Suggestions?

    salsaturation

    (@salsaturation)

    @gabiclayton

    Add the following to you custom css

    .menu-menu-1-container {
    text-align: center;
    }
    andracuamic

    (@andracuamic)

    For me it finally worked like this:

    #page .container header hgroup {
    float: none;
    margin: 0 auto;
    }
    
    .site-header img, img.size-full {
    display: block;
    margin: 0 auto;
    }
    
    .main-navigation {
    float: none !important;
    margin: 0 auto;
    width: 560px;
    height: 40px;
    }

    You just have to play a bit more with numbers here (at width):

    .main-navigation {
    float: none !important;
    margin: 0 auto;
    width: 560px;
    height: 40px;
    }
    GabiClayton

    (@gabiclayton)

    salsaturation, that worked to center the menu. Thanks, But it also centered the items in the sub menus which I really want to be flush left. Any ideas on how to do that?
    See: https://olympiafriends.org/

    Theme Author Fruitful Code

    (@fruitfulcode)

    New theme version 1.3 will be include switcher in theme options for different positions (logo and menu)

    andracuamic

    (@andracuamic)

    great! thanks!

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Centering Header Logo and Menu bar?’ is closed to new replies.