How To Make My Navigation Bar Align Center Or Right

Hi coders,
Please let me know how to make navigation bar of my landing page center?

An easy way to center that navigation bar is by removing width:100%; and adding margin: auto to your #nav-bar CSS, like this:

  margin: auto;

Ok thanks! One thing more if you can please help me with.
When I click on any element of my navigation bar, navigation bar is disappeared!