• I see that this comes up over and over again, and I’ve followed what I’ve found but nothing seems to work for me:

    How would I center my navigation menu here?:

    menu/

    I suspect the margin needs to change but do I also have to remove floats?

    Thank you in advance,

    Rita

Viewing 3 replies - 1 through 3 (of 3 total)
  • Change what you have here to:

    #navigation {
        clear: both;
        display: table;
        float: none;
        margin: 0 auto;
    }

    Thread Starter ritalcnyc

    (@ritalcnyc)

    I’m having a problem with this. I am using a child theme, and the css above is getting over-ridden by the responsive css at the bottom of the parent style.css on line 1190 here:

    @media (max-width: 980px) {
    	#navigation {
    		clear:both;
    		float:left;
    		margin-left:-10px;
    	}

    And so the nav is not centering (although when I uncheck it in the chrome inspector, it does center)

    My question is: how can I get rid of this margin-left without messing up the responsiveness of the theme, which I need?

    Rita

    Thread Starter ritalcnyc

    (@ritalcnyc)

    I got it to override by putting the css you suggested in my header.php file.

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