Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #53127

    David G
    Participant

    Hi,

    Is there a way to center the main navigation. Home, About, Services, Contact. Currently it’s flush right.

    -David

    #53279

    Support
    Member

    Hi David,

    Thanks for dropping by, to make your navigation centered, please add the following code snippet into the customizer Custom > CSS

    
    .masthead-inline .x-nav{
      display: block;
      float: none;
      text-align: center;
      width: 100%;
      position: absolute;
    }
    .masthead-inline .x-navbar .x-nav>li {
      display: inline-block;
    }
    
    

    Hope that help, cheers.

    #53284

    Patrick M
    Participant

    When i add this code ist turn from right to left but not in the middle. I use Renew. Same with the Logo, how can i set it to the middle ?

    #53328

    David G
    Participant

    Hi,

    Me too. It turns from right justified to left Justified.

    Another approach might be to go from inline to stacked, but eliminate the x-logobar. Is this possible?

    I am putting the logo in the slider and I want to eliminate it from the nave bar entirely, but have the links centered.

    Awesome theme by the way.

    David

    #53524

    Rad
    Moderator

    Hi David,

    Stacked navigation is good option too and you could hide logo by adding this css.

    .x-logobar {
    display: none;
    }
    

    Cheers!

    #53727

    David G
    Participant

    That did the trick! Thanks for being so quick!!! You guys are awesome!

    #53886

    Christian
    Moderator

    You’re welcome David. And, thank you for your kind words.

    #79449

    Chance W
    Participant

    I ran into the same problem with the Renew stack. The code referenced above to center navigation actually makes it aligned left. Is there some other CSS I can try to align in center in the renew stack and not have to use a stacked logo? I’d like to use inline logo and just display:none on the homepage since I’m using a slide above the masthead on the home page and still have the inline logo on other pages.

    #79450

    Rad
    Moderator

    Hi Chance,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have have provided us with your URL, we will be happy to assist you with everything.

    #79456

    Chance W
    Participant
    This reply has been marked as private.
    #79459

    Christian
    Moderator

    Hey Chance,

    Please choose Stacked layout for your logo and navigation and you’ll have a centered navbar.

    Thanks.

    #79461

    Chance W
    Participant

    Is there a way to only make the homepage have the stacked layout to get the centered nav menu? Or CSS for the inline layout to center the nav menu? Only the homepage needs the centered menu and the rest of the site will be inline layout. I tried the code above on the custom css for just the homepage and like the other users it aligned the menu left.

    #79463

    Christian
    Moderator

    In that case, please don’t use the Stacked layout since it is a global setting. Please add the code below in your Customizer > Custom > CSS instead.

    .masthead-inline .x-nav {
    float: none;
    position: relative;
    left: 25%;
    }
    
    @media (min-width:980px) and (max-width:1080px) {
    .masthead-inline .x-nav {
    left: 15%;
    }
    }

    Hope that helps. 🙂

    #79465

    Chance W
    Participant

    Awesome, it worked! Thanks for the super fast response.

    #79467

    Christian
    Moderator

    Hey Chance,

    I have updated the code to maintain centering between 980px and 1080px.

    Hope that helps. 🙂