WordPress.org

Support

Support » Themes and Templates » Anyone know how to center the top nav bar?

Anyone know how to center the top nav bar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Warning – not safe for work – loud rock music autoplay when site is accessed.

    In your theme’s style.css find #nav selector and add text-align: center to get this:

    #nav {
    background:#000000 none repeat scroll 0 0;
    border:0 solid #000000;
    font-size:14px;
    font-weight:bold;
    line-height:1.5em;
    padding:10px;
    text-transform:uppercase;
    text-align: center
    }

    Then find #nav ul in same style.css and change margin to 0 auto lie so

    #nav ul {
    display:block;
    list-style-image:none;
    list-style-position:outside;
    list-style-type:none;
    margin:0 auto;
    padding:0;
    }

    Then find #nav ul li in same style.css and change margin to 0 3px

    #nav ul li {
    float:left;
    margin:0 3px;
    padding:0;
    }

    Thanks! Unfortunately, it didn’t seem to work. I replaced everything. Any other ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Anyone know how to center the top nav bar?’ is closed to new replies.
Skip to toolbar