• I am trying to center my menu button on my wordpress website, but I cannot seem to figure it out. I wanted to set it so that it will be center no matter how many buttons I add or remove. I found some answers on this forum, but nothing I tried worked. I’m pretty new to this, so layman’s terms are appreciated! The site is https://www.ccwbystate.com. Thank you all in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can’t centre it because all of <li> tags in the menu are floated left. The only way around this is to apply a fixed width to the containing <ul> and centre that.

    Thread Starter mjd081

    (@mjd081)

    Hmm. Ok. Would you mind explaining how I could do that with my current setup? Thanks again for your quick response.

    Try editing your theme’s stylesheet and changing:

    #access ul {
        margin: 0;
        padding: 0;
        vertical-align: baseline;
    }

    to:

    #access ul {
        margin: 0 auto;
        padding: 0;
        vertical-align: baseline;
        width: 96%;
    }
    Thread Starter mjd081

    (@mjd081)

    Hmm, I tried that and it didn’t work. Any other ideas? Thanks again.

    It worked for me when I tried it on your site using Firefox + Firebug.

    Thread Starter mjd081

    (@mjd081)

    I am using Chrome and it did not work. I also tried in firefox without the plugin and it still didnt work? I replaced it exactly as you said. Does anyone else have any ideas?

    Thread Starter mjd081

    (@mjd081)

    Sorry for the bump, but any help would really be appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Center Header Buttons’ is closed to new replies.