Title: Centre align menu
Last modified: August 22, 2016

---

# Centre align menu

 *  [isaaccallan](https://wordpress.org/support/users/isaaccallan/)
 * (@isaaccallan)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/centre-align-menu/)
 * Hello,
 * I am looking to centre align the menu on my website and evenly space out the 
   options on the menu so it doesn’t look strange and stuck to the left of the page.
   Anyone know how to do this?
 * Thank you very much.
 * [http://www.young-perspective.net](http://www.young-perspective.net)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/centre-align-menu/#post-5715861)
 * Hey there isaaccallan,
 * You’ve got a nice site there 🙂
 * This is definitely possible with some custom CSS. To center the navigation on
   your site please try adding the following CSS code in the style.css file of your
   [child theme](http://codex.wordpress.org/Child_Themes) or if your theme doesn’t
   have custom CSS tab add it in your site using the following plugin:
 * [http://wordpress.org/plugins/simple-custom-css](http://wordpress.org/plugins/simple-custom-css)
 *     ```
       nav#mainnav {
       margin-left: auto;
       margin-right: auto;
       width: 713px;
       }
       ```
   
 * This should center the menu. Hope this helps 🙂
 * Best regards,
    Bojan
 *  Thread Starter [isaaccallan](https://wordpress.org/support/users/isaaccallan/)
 * (@isaaccallan)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/centre-align-menu/#post-5715879)
 * Hi Bojan,
 * Thank you very much, appreciate that. Any idea how to space them evenly across?
   So that they fill the whole nav bar?
 * Thanks again an thank you for the compliment!
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/centre-align-menu/#post-5715940)
 * Hey again isaaccallan,
 * Hey again isaaccallan,
 * In that case please remove the code I gave gave you in my previous post and add
   the following:
 *     ```
       @media screen and (min-width: 961px) {
       ul#mainnav-menu {
       display: table !important;
       width: 100%;
       }
   
       #mainnav-menu li {
       float: none;
       display: table-cell;
       text-align: center;
       }
       }
       ```
   
 * This should spread them across 100% of the container. Normally I wouldn’t suggest
   the use of the !important declaration. However, it can sometimes be a necessary
   evil when over-writing existing styles. You can find more information on the 
   use of important here:
 * [https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#The_!important_exception](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#The_!important_exception)
 * Hope this helps 🙂
 * Best regards,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Centre align menu’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/centre-align-menu/#post-5715940)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
