WordPress.org

Ready to get started?Download WordPress

Forums

Anyone know how to center the top nav bar? (4 posts)

  1. Dani Weymouth
    Member
    Posted 4 years ago #

    Hi. I'm playing around with my CSS template though I still have a lot to learn about CSS. Anyone know how to center the buttons across the page? Site is at: http://realrockentertainment.com/wordpress/.

    Thanks!!!

  2. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    Warning - not safe for work - loud rock music autoplay when site is accessed.

  3. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    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;
    }
  4. Dani Weymouth
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic