• I just recently got my child theme to work properly. I also created a header.php file in my child theme folder to get my navigation menu under the header instead of on top. That all worked fine. Then I went to my style.css sheet and added

    .main-navigation ul.nav-menu {
    background: none repeat scroll 0 0 #F0942C;
    border: 0 none;
    padding: 0 0 0 10px;
    text-align: center;
    }

    But it will not work. I am trying to center my navigation menu. I activated the parent theme and tested it in the css editor there and it worked fine. Does this have something to do with the header.php file I have in my child theme? Or would that have no effect? I did test other codes for random changes in my child theme style.css and it worked.. Any ideas?

    http://www.michellelynnphoto.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • Text align is only meant for text – not block elements – try this:

    .main-navigation {
        display: table;
        margin: 1.7rem auto;
    }

    Thread Starter mlphoto83

    (@mlphoto83)

    Totally worked! Thank you.. Just out of curiosity.. why did my code work in the main twentytwelve theme to center align the menu but not in the child?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Centering navigation works on 2012 theme but not child theme.’ is closed to new replies.