Title: Vertical align nav in header
Last modified: November 9, 2018

---

# Vertical align nav in header

 *  Resolved [aleejelly](https://wordpress.org/support/users/aleejelly/)
 * (@aleejelly)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/vertical-align-nav-in-header/)
 * I’m trying to align my nav in the center of the header but I’m not finding a 
   way to do that.
 * I tried doing something like this but it’s not working
 *     ```
       #site-navigation {
               text-align:center
           }
           #site-navigation li {
               display:inline-block;
               margin-left: -5px;
           }
           #site-navigation li li {
               display:block;
               text-align:left
           } 
       ```
   
    -  This topic was modified 7 years, 7 months ago by [aleejelly](https://wordpress.org/support/users/aleejelly/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvertical-align-nav-in-header%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/vertical-align-nav-in-header/#post-10863082)
 * Hello,
 * Try to use the code below. Add it in the Customize > Custom CSS section
 *     ```
       #site-navigation-wrap {
           float: none;
           position: relative;
           right: inherit;
           display: flex;
           justify-content: center;
       }
       ```
   
 *  Thread Starter [aleejelly](https://wordpress.org/support/users/aleejelly/)
 * (@aleejelly)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/vertical-align-nav-in-header/#post-10863920)
 * Hi there,
 * Thank you for all of your attempts to help. I have added this to the Custom CSS
   section and nothing has changed. I feel like an idiot but I can’t find a way 
   to share a screenshot here. [Here’s where I’ve added it](http://www.mnarchitect.com/wp-content/uploads/2018/11/Screen-Shot-2018-11-09-at-7.09.16-AM.png).
   I’ve also tried [Here](http://www.mnarchitect.com/wp-content/uploads/2018/11/Screen-Shot-2018-11-09-at-7.14.11-AM.png)
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/vertical-align-nav-in-header/#post-10865903)
 * After adding the CSS, try to reload your live site and check it is working or
   not. You can also use **!important ** to make the CSS work. Read more – [CSS Priority](https://stackoverflow.com/questions/5701149/when-to-use-the-important-property-in-css)

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

The topic ‘Vertical align nav in header’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/vertical-align-nav-in-header/#post-10865903)
 * Status: resolved