WordPress.org

Ready to get started?Download WordPress

Forums

Centering with Twenty Thirteen Child Theme (7 posts)

  1. adlawrence
    Member
    Posted 1 year ago #

    I'm working on a child theme for Twenty Thirteen and I can't seem to center the navbar. I'm working in the CSS and can't seem to find the right place to plugin the code:

    text-align: center;

    Any ideas? My site is: ADLawrence.com

    (Under construction.)

  2. graphical_force
    Member
    Posted 1 year ago #

    On line 836 of style.css change it to this:

    ul.nav-menu, div.nav-menu > ul {
    margin: 0;
    padding: 0 40px 0 0;
    text-align: center;
    }

  3. adlawrence
    Member
    Posted 1 year ago #

    Thanks, graphical_force. I'm glad to know that someone else thought that was the right spot. But it isn't working. Any other ideas?

  4. WPyogi
    Forum Moderator
    Posted 1 year ago #

    Try adding this to the child style.css file:

    .nav-menu {
       display: table;
       margin: 0 auto;
    }

    Also, you should have ONLY changes in the child theme style.css file - not a copy of the entire parent file.

  5. adlawrence
    Member
    Posted 1 year ago #

    WPyogi, thanks for reminding me and not to worry: All of my changes are going directly into my child theme.

    I added that new coding following .nav-menu { and there doesn't seem to be a change.

    Any ideas?

  6. adlawrence
    Member
    Posted 1 year ago #

    Hmm ... and each time I FTP the file, it doesn't seem to note the changes. I'll restart my file transfer program.

  7. adlawrence
    Member
    Posted 1 year ago #

    Victory! Thanks for the help, WPyogi and graphical_force. I really appreciate it. Next time, I'll try restarting my FTP first.

    *sigh*

Topic Closed

This topic has been closed to new replies.

About this Topic