expand bar on both sides of css menu

I  finally got the horizonal css menu nav bar to center, but now I can't get the bar to expand to 100% of width because I had to declard a width size in order to center it.  Is there any way around this problem.

 http://insurance.illinois.gov/dropdown/menu.html
smitty62Asked:
Who is Participating?
 
Mark BradyPrincipal Data EngineerCommented:
it looks to me like you need to add

text-align:center;

to your top navbar code.

#topNavBar{
background:#00F;
font-weight:bold;
margin: 0 auto;
width:100%;
text-align:center;
}

that will center anything you put inside the topNavBar div so it should center all your menu items. If not then the ul and li styles are over-riding it and you need to play around with text-align:center; in those elements as well.
0
 
Mark BradyPrincipal Data EngineerCommented:
After your <body> tag, add this

<center>

Now change the width of the horizontal navbar to 100% instead of 825px so it fills the whole width or change the width size to 1264px. The problem of centering is because you are missing the <center> tag to center all page content. For each item you don't want centered, you add "text-align:left" to those div elements. Anyway try that and see how it looks.
0
 
Mark BradyPrincipal Data EngineerCommented:
Actually you would be better off putting the top nav bar inside the DOIBanner container as that container has a width property of 1265px and the nav bar looks to be inside it.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
smitty62Author Commented:

The bar becomes uncentered and does not expand.

http://insurance.illinois.gov/dropdown/menu.html
0
 
Prafulla MaharjanCommented:
The Horizontal size is maximum 1000px if it increase more than that it will come a scroll bar. please fix the size and place it.
0
 
Mark BradyPrincipal Data EngineerCommented:
smitty62: Can you post your webpage and the css if it is external. It would help if I could edit it myself and get it centered. I can't see your code so don't know what to tell you but this will be something very VERY simple to fix. Just need to see all of your code for that page.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.