WordPress.org

Support

Support » Themes and Templates » Customizr » [Resolved] How to center nav bar in Customizr

[Resolved] How to center nav bar in Customizr

  • morning,

    Not quite sure as I had fixed this same issue some months back but the main nav bar on our site is aligned left and had been centered. Could you please take a look and see what I need to do to get it back in the middle? I had checked the forums and used Google tools and I could not find what I need to correct this. Thank you for your help.

    Site is at : http://kaosradio.org/

    Bob H

Viewing 7 replies - 1 through 7 (of 7 total)
  • It appears you used this snippet, but have made some additional adjustments…maybe compare your work to the original snippet to see what you are missing or inadvertantly changed…

    hi…

    Thank you for helping me. The snippet isn’t the issue as they are exactly the same one to the other.

    After checking around more what the issue is in the Customizr > parts > class-header-header_main.php file. Yes, not the child and not a good idea.

    From the version that worked before:

    <!—- this code here centers nav—->
    <div class=”<?php echo apply_filters( ‘tc_navbar_wrapper_class’, ‘navbar-wrapper clearfix span12’ ) ?>” style=”margin:0 auto;”>

    And the current one that does not:

    <!—- this code here centers nav—->
    <div class=”<?php echo apply_filters( ‘tc_navbar_wrapper_class’, ‘navbar-wrapper clearfix span9’ ) ?>”>

    Issue is if I change out the code to match the old version it breaks the site as I get an error message and the pages will not display.
    Messsage is:

    Parse error: syntax error, unexpected T_STRING in /home/content/35/11332735/html/wp-content/themes/customizr/inc/parts/class-header-header_main.php on line 232

    And it would appear from looking at Google Developer tools that the issue is with the blue.min.css file. Which the old site did not use.

    So the question is how do I now center that menu as the snippet does not work for me as it is and the fix I had kills the site?

    thanks

    Using FireFox’s webmaster tools plug-in I come up with the following that I believe is the centering issue:
    The below div class is surrounding your navbar-inner class
    <div class="navbar notresp row-fluid pull-left">
    The pull-left is referanced here:

    <link rel="stylesheet" id="cff-font-awesome-css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css?ver=4.0.3" type="text/css" media="all">
    /* Line 4 */
    .pull-left
    {
      float: left;
    }

    I would try and find out where the pull-left class is coming from and remove it from the the div that surrounds the navbar-inner class.

    Thanks for taking a look…I see what you are looking at but pulling that pull-left code from the div has no effect.

    In chrome dev tools in this code: <div class=”navbar-wrapper clearfix span9″> I change the 9 to 12 all is well but again in the file itself it gets the min css file involved and kills the site.

    The Snippet that @deputy05 pointed at has been updated recently, input from @electricfeet which gave a cleaner coding solution. The key part is the entries in functions.php in the Child Theme.

    Changing span9 to span12 is the key.

    Did you try the changes in full?

    Thanks for the message. Yes, I did just try that and adding the functions code got it working. Thank you very much your help.

    Bob

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] How to center nav bar in Customizr’ is closed to new replies.
Skip to toolbar