?
Solved

cannot center ul dropdown menu without center tag

Posted on 2011-04-19
7
Medium Priority
?
299 Views
Last Modified: 2012-08-13
I need to get this page 100% validated using html5.  I can center the menu using the center tag, but that is not compliant.  How can I get this page to center without the <center> tag.  I have tried and tried, and cannot do it.  

http://insurance.illinois.gov/reports/eeheaderproblem.asp
0
Comment
Question by:smitty62
  • 3
  • 3
7 Comments
 
LVL 19

Expert Comment

by:Greg Alexander
ID: 35426234
Try change your css like this:
#topNavBar{

width:50%;

background:#369;

font-weight:bold;

height:20px;

padding:0px;

margin:auto;

position:relative;

border:0;

z-index:100001;

font-size:small;

}

Open in new window

0
 
LVL 19

Expert Comment

by:Greg Alexander
ID: 35426239
You can then wrap another div around that with 100% and a blue background
0
 

Author Comment

by:smitty62
ID: 35426348
Nope, didn't work.  Here's the file.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 19

Expert Comment

by:Greg Alexander
ID: 35426741
The file did not come across
0
 

Author Comment

by:smitty62
ID: 35426766
Here it is...hopefully.  I changed the extension to txt, but you can change it back to asp after you receive it. EEHeaderProblem.txt
0
 
LVL 16

Accepted Solution

by:
HagayMandel earned 2000 total points
ID: 35431376
Just add to #topNavBar:
margin-right:auto;
margin-left:auto;

Open in new window

This will center the upper menu
0
 

Author Closing Comment

by:smitty62
ID: 35432469
Thank you, that worked.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

864 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