Center Custom Menu in 2010 Theme

  • Author
    Posts
  • #667435

    seattle7
    Member

    Hello All,
    I am trying to center the custom menu for my WordPress site using the 2010 theme (the website is Seattle7Writers.org) Previously, I was able to center the default menu before using this custom CSS:

    .menu {
    text-align:center;
    }

    .menu ul {
    display:inline-block;
    }

    However, now that I am using a custom menu (which I called “menu alt”) it does not appear to work. Would anyone know how I would have to alter the CSS to target the new custom menu? I have tried a number of changes, but none seem to work. Thank you in advance for any help you can provide.

    The blog I need help with is seattle7writers.org.

    #667593

    There is a trick to this, but for the life of me I cannot get it to work with 2010.

    I’ll tag this thread for staff attention since they now provide support for the Custom Design upgrade.

    #667594

    seattle7
    Member

    Thank you very much for your fast reply. Hopefully they will be as quick to assist me as you just were.

    #667598

    You are welcome. I had not recorded that trick and had to go googling to find it, but alas it did not work.

    #667702

    @seattle7: Try this (your solution, with different selectors):

    .menu-header {text-align:center;}
    .menu-header ul {display:inline-block;text-align:left;}
    .menu-header ul a {margin-bottom:-4px;}

    Of course you could also use this simplistic solution (will need changing the number if you change your tabs):
    #access .menu-header, div.menu {margin-left:182px;}

    @rich:
    a) What was the trick you were talking about?
    b) Had you modlooked the thread or added only the tags I’m seeing now?

    #667704

    a) It has to do with setting it relative, using a “left” value of half the div width and then also declaring a -50% left margin. I’ve used it before, but failed to record it and when I went back and searched for it, this time I could not get it to work.

    b) I did modlook it I’m pretty sure.

    #667705

    I’m also pretty sure you had modlooked it… Now would I be to blame if I continued my conversation with designsimply here?

    #667734

    seattle7
    Member

    Thank you both for the help!

    Panaghiotisadam, I tried both fixes individually and they each worked like a charm – I’m definitely copy pasting them for later use in other sites. Thanks again.

The topic ‘Center Custom Menu in 2010 Theme’ is closed to new replies.