Solved

Centering Menu Bar

Posted on 2014-11-30
3
70 Views
Last Modified: 2014-11-30
I am trying to center the menu with no luck.  It's staying to the left.  How can I center this?
http://www.davidschure.com/index.php
nav-styles.css
style.css
0
Comment
Question by:DS928
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40472641
To center easily you need to give your menu a defined width then you can use margin:0 auto

e.g. in #cssmenu{...} add

    margin: 0 auto;
    width: 850px // replace your width:auto
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40472652
820px covers it.
0
 

Author Closing Comment

by:DS928
ID: 40473007
Perfect!  Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now