The Easiest Way to Center a Menu

This two CSS properties will solve most of your menu-centering problems. Of course this could also be used on other elements that you have trouble centering.

.menu {
   display: table;
   margin: 0 auto;
Firebug shows CSS properties.
Firebug Menu CSS
Center a WordPress menu
Click image to expand.

Of course you’ll have to remove any float properties if there are any.

Share This Post


Add a Comment
  1. A nice solution to centring variable element widths without specifying actual widths.
    I’m definitely recommending this technique to others.

  2. Hi,
    I like the theme a lot. If you have the time I need to know how to add pages on my site to an extra menu list. I cannot donate anything today but I will do so happily on the 1st. Please help. Thanks.

    1. I don’t think I understand what you mean here. Do you want to add a whole new menu besides the main one below the header?

      1. YES. i want to have separate fully functional menus each of a kind, like ‘MARKETING Articles” and “Kindle Publishing Articles” for example.

        1. I want the separate menus to appear at the sidebar, not just below the header, I mean. Or at least boxes each having a list of articles of a kind.

        2. You can do all of this by using custom menus. Go to Dashboard -> Appearance -> Menus. You can create menus there and place a custom menu on the widgets page. Here’s a good tutorial creating custom menus.

          1. Looks like just the thing. Thanks tons. This is very very helpful and very much appreciated. Any kind of how-to is hard to come by for me, especially very specific how-to. Even after paying out a fortune. If I am still alive on the 1st of February I will donate like an artist to a contest.

  3. Hello ron(kabayan),

    I would like to ask if how I can center all my page/post title on your frontier theme, what will i put in the child theme css?


    1. article .entry-title {
          text-align: center;

Leave a Reply

Please write your comments in english. I delete anything that even remotely resembles spam.

Note: When posting code, enclose it in pre and code tags.
e.g. Add code here