Center Custom Menu

  • Author
    Posts
  • #941616

    How do I center the topics in the custom menu? I inserted the following code, but it centered the subtopics instead of the bar itself.

    .menu {
    text-align:center;
    }

    .menu ul {
    display:inline-block;
    }

    The blog I need help with is belligerentbulldog.com.

    #941731

    I’ll have to work on this later. The code you reference above will not work with your theme. CSS is theme specific and the theme you are using has different selector names. I tried it quickly but it didn’t work, so I’ll have to dig into things a little to figure out what is going on.

    #941752

    Alright, thank you for the diligence. If you find anything that works, that would be awesome!

    #941767

    This will do it for you I’m pretty sure. It works with Firebug in Firefox. Make sure and check it in different browsers if you can such as IE and Chrome. Firefox and Safari work just fine on my Mac.

    .navigation-inside {
    text-align: center;
    }
    
    #navigation .menu {
    float: none;
    width: auto;
    }
    #941768

    One note I’ll add: If your menu goes to two lines, this solution will implode and the entire menu will go back to being floated left.

    #941811

    Adding a display property helped thesacredpath’s solution work for me in Chrome too:

    #navigation {
    	text-align: center;
    }
    #navigation .menu {
    	display: inline-block;
    	float: none;
    	width: auto;
    }

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