WordPress.org

Ready to get started?Download WordPress

Forums

Portfolio Press
Center Navigation Menu (4 posts)

  1. ritalcnyc
    Member
    Posted 6 months ago #

    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

  2. WPyogi
    Volunteer Moderator
    Posted 6 months ago #

    Change what you have here to:

    #navigation {
        clear: both;
        display: table;
        float: none;
        margin: 0 auto;
    }
  3. ritalcnyc
    Member
    Posted 6 months ago #

    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

  4. ritalcnyc
    Member
    Posted 6 months ago #

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

Reply

You must log in to post.

About this Theme

About this Topic