Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5963867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:19:48+00:00 2026-05-22T19:19:48+00:00

I have a fairly standard CSS driven drop down menu (the CSS for the

  • 0

I have a fairly standard CSS driven drop down menu (the CSS for the lists & list items is below, if needed). All that I want to do it, is to center it in the browser (must support MS IE 7) … but that seems to escape me 🙁

Can somebody help me with this? Maybe a simple example? But really, I think that I probably just need a CSS class definition for an enclosing DIV …

/*Color navigation bar normal mode*/  
.menu a,  
.menu a:visited {font-family:Arial, Helvetica, sans-serif;font-style:normal;font- weight:bold;font-size:12px;color: #000000;background-color: #FFFFFF;text-decoration: none;}  
.menu ul {list-style-type:none;padding:0; margin:0;}  
.menu ul li {float:left; position:relative; z-index:auto !important /*Non-IE6*/; z-index:1000 /*IE6*/; margin-right: 4px; border:solid 1px #004080; }  
.menu ul li a {color: #000000;background: #FFFFFF;float:none !important /*Non-IE6*/; float:left /*IE-6*/; display:block; height:30px; line-height:30px; padding:0 10px 0 10px; text-decoration:none; }    
.menu ul li ul {display:none; border:none;color: #000000; background: #FFFFFF;}  
.menu ul li:hover a {background-color:#d7f1ff; text-decoration:none; color:#000000;}     
/*Color main cells hovering mode*/   
.menu ul li:hover ul {display:block;  position:absolute; z-index:999; top:29px; margin-top:1px; left:0;}  
.menu ul li:hover ul li a {display:block; width:12em; height:auto; line-height:1.3em; margin-left:-1px; padding:5px 10px 5px 10px; border-left:solid 1px #004080; border-bottom: solid 1px #004080; background-color:#FFFFFF;  color:#000000;}   
/*Color subcells normal mode*/
.menu ul li:hover ul li a:hover {background-color:#d7f1ff; text-decoration:none;color:#000000;} /*Color subcells hovering mode*/  
.menu table {position:absolute; top:0; left:0; border-collapse:collapse;color: #000000;background: #FFFFFF;}  
.menu ul li a:hover {background-color:#d7f1ff; text-decoration:none;color:#000000;} 
/*Color main cells hovering mode*/
.menu ul li a:hover ul {display:block; width:12em; position:absolute; z-index:999; top:29px; left:0; }  
.menu ul li a:hover ul li a {display:block; width:12em; height:1px; line-height:1.3em; padding:4px 16px 4px 16px; border-left:solid 1px #004080; border-bottom: solid 1px #004080; background-color:#FFFFFF;  color:#000000;}   
/*Color subcells normal mode*/
.menu ul li a:hover ul li a:hover {background-color:#d7f1ff; text-decoration:none;color:#000000;}   
/*Color subcells hovering mode*/
.menu ul li a:hover ul li a:hover {background-color:#d7f1ff; text-decoration:none;color:#000000;} /*Color subcells hovering mode*/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:19:49+00:00Added an answer on May 22, 2026 at 7:19 pm

    You can do it with the link g.b sent, but you can also do it by using display:inline-block; which will result in less code.

    See this jsfiddle: http://jsfiddle.net/4Q5N2/

    <div>
        <ul>
            <li>center</li>
            <li>menu</li>
        </ul>
    </div>
    

    –

    div { background:orange; }
    ul {
        list-style:none;
        text-align:center;
    }
    ul li {
        display:inline-block;
        zoom:1;
        *display:inline;
        margin:5px;
        background:purple;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly standards compliant XHTML+CSS site that looks great on all browsers
I have a fairly standard inheritance situation in my current LINQ-to-SQL project. I have
I have a fairly standard rails app and would like to be able to
I have a fairly standard OLTP normalised database and I have realised that I
I have a fairly standard .Net MVC Controller method: public ActionResult Add(Customer cust) {
I have a fairly simple addition to the HTTP standard. An ambitious goal I
I'm fairly new to PHP and have built a medium sized website using standard
I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and
In my Rails app I have a fairly standard has_many relationship between two entities.
We have what I think is a fairly standard build process: 1. Developer: Check

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.