WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Livegreen Theme - How to center navigation bar, not text (5 posts)

  1. amyjo114
    Member
    Posted 1 year ago #

    http://www.bhlivingwell.com

    I have put two navigation bars into my theme and the first one looks good because it fills out the column width, but my second one, which is directly below the first, looks a bit odd. I would like to center it.

    I would like it to be responsive in-case I decide to add more pages to that bar, but it may be a while before I do so. So, if I have to it can be fixed.

    Any help would be appreciated.

  2. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    Centring nav menus has been asked and answered many times before;


    Try using a browser developer tool for this kind of exploratory CSS work. You can expose↓ styles that are applying to elements in your webpage.
    I use Google Chrome's built-in Developer Tool because I find it particularly easy to use.

    Alternatively, ask general CSS forums;
    http://csscreator.com/forum
    http://www.cssforum.com.pk/
    http://css-tricks.com/forums/
    http://www.welovecss.com/
    http://www.codingforums.com/

    Now that you know the style, from being exposed by the Developer Tool/ recommended by the CSS forum, you can add↓ a new style to override it.

    You ought to add new styles externally↓, not within the theme's files. Changes to the theme's files will compromise the theme and be compromised when the theme updates.

    External changes can be made using a Child Theme or through a plugin that provides Custom CSS↓ functionality.

    I recommend using the Jetpack plugin's Custom CSS functionality to hold your CSS.

  3. amyjo114
    Member
    Posted 1 year ago #

    I am aware that the question has been asked and answered many times before. In fact, I had read 90% of those posts before typing this one. But it seems that every theme has its own quarks and fixes. I have tried all of the fixes from the above forums and none of them worked...in fact they didn't do anything for me. So, either I don't know what I'm doing (which is likely) or none of them are the correct fix for my theme.

    I asked the question looking for help because I can't figure out my problem or the answer...not because I didn't feel like researching this for myself.

  4. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    That's right, every theme has its own CSS quarks and fixes. This means you can't just copy someone else's fix for another theme. You need to have a basic understanding of CSS to make CSS changes.

    Are you okay with this:

    .menu-menu-1-container {
     display: table;
     margin: 0 auto;
    }
  5. amyjo114
    Member
    Posted 1 year ago #

    Thank you. I appreciate your help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.