• Resolved CypressWebs

    (@jmeyer2485)


    Is there a way to center the navigation text? I see you have it as float: left.

    I tried to do text-align but it not work.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Ovidiu Nicolae

    (@ovinic)

    Hi jmeyer2485,

    thank you for downloading and using the Accent theme. There is a way to center the main navigation, but unfortunately it is not the most elegant and practical solution. In style.css on line 1388 you have to add a couple of extra css rules in order to center the navigation.

    First, you have to add margin: 0 auto.
    Secondly, in order to center a block element, you must specify a width in pixels. Basically you have to measure approximately the length of your menu in pixels and add that particular width to the css:
    width: 600px;

    Your final code should be like this:

    .main-navigation ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
    margin: 0 auto;
    width: 600px;/*in case your width is 600px*/
    }

    The downside is that your nested menu item (sub-pages) will be offset and look odd. But if you don’t have nested menu items this shouldn’t be an issue. Also, I recommend doing this mod in a child theme. Please let me know how it goes and I’ll gladly help.

    Regards,
    Ovidiu

    Theme Author Ovidiu Nicolae

    (@ovinic)

    I’m marking the topic as resolved, please feel free to post again if you need any help.

    Ovidiu

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Center The Navigation’ is closed to new replies.