Centering Menu Bar

Discussion in 'Cloriato WordPress Theme' started by tylerkjohnson, May 15, 2013.

  1. tylerkjohnson

    tylerkjohnson New Member

    Joined:
    Feb 15, 2012
    Messages:
    6
    Likes Received:
    0
    I centered the menu bar using the code below, every time I click on a different tab it sends the tab that proceeds it back to the left side of the page. For example:

    Screen shot 2013-05-15 at 4.05.22 PM.png



    #menu li.current-menu-item a, #menu li.current_page_item a {
    margin-left: 170px;
    }
     
  2. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
    Hello,
    Paste the following code in your Custom CSS
    (Appearance -> Theme Options -> Styling Options -> Custom CSS)
    Code:
    #menu .ddsmoothmenu li {
    float: none;
    display: inline-block;
    }
    #MainNav {
    text-align: center;
    }
    Instead 0f

    Code:
    #menu li.current-menu-item a, #menu li.current_page_item a {
    margin-left: 170px;
    }
    This will solve your issue.
     
  3. tylerkjohnson

    tylerkjohnson New Member

    Joined:
    Feb 15, 2012
    Messages:
    6
    Likes Received:
    0
    I pasted the new code but the nav is now left aligned and not centered.
     
  4. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
  5. tylerkjohnson

    tylerkjohnson New Member

    Joined:
    Feb 15, 2012
    Messages:
    6
    Likes Received:
    0
  6. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
    Hello,
    Paste the following code in your Custom CSS
    (Appearance -> Theme Options -> Styling Options -> Custom CSS)
    Code:
    #menu .ddsmoothmenu li {
    float: none;
    display: inline-block;
    }
    #menu {
    text-align: center;
    }
    Instead 0f
    Code:
    #menu .ddsmoothmenu li {
    float: none;
    display: inline-block;
    }
    #MainNav {
    text-align: center;
    }
    This will solve your issue.
     

Share This Page