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 8870387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:42:55+00:00 2026-06-14T17:42:55+00:00

I have this jsfiddle and you can see the nav items are align to

  • 0

I have this jsfiddle and you can see the nav items are align to the left. Is there a way to center these items regardless of nav items, because I will have one more nav item when the user logs in…any ideas

Here is my html

<div id="cssmenu">
<ul>
  <li><a href="#"><span>Home</span></a></li>
  <li class="has-sub "><a href="#"><span>Products</span></a>
     <ul>
        <li class="has-sub "><a href="#"><span>Product 1</span></a>
           <ul>
              <li><a href="#"><span>Sub Product</span></a></li>
              <li><a href="#"><span>Sub Product</span></a></li>
           </ul>
        </li>
        <li class="has-sub "><a href="#"><span>Product 2</span></a>
           <ul>
              <li><a href="#"><span>Sub Product</span></a></li>
              <li><a href="#"><span>Sub Product</span></a></li>
           </ul>
        </li>
     </ul>
  </li>
  <li><a href="#"><span>About</span></a></li>
  <li><a href="#"><span>Contact</span></a></li>
 </ul>
 </div>​
  • 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-06-14T17:42:57+00:00Added an answer on June 14, 2026 at 5:42 pm

    If you want to make your and li are display:block (perhaps you want to give them same widths), you got the right idea with relative positioning, just add the following properties:

    #cssmenu ul {
        left: 50%;
    }
    #cssmenu ul li{
        right: 50%;
    }
    

    If not, make your li simply display:inline removing all the other stuff and simply doing:

    #cssmenu { text-align: center; }
    #cssmenu ul { list-style: none; }
    #cssmenu ul li { display: inline; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this small testcase: http://jsfiddle.net/sV8js/ You can see that in Chrome (tested on
Take a look at this fiddle: JsFiddle As you can see I have put
In jsfiddle.net , I have this simple code: console.log('yep'); alert('hello'); I can see the
I have a graph like this jsFiddle code Now on plotHover i can see
I have this code: http://jsfiddle.net/5RbrL/ As you can see, the text doesn't go over
can someone take a look at this please http://jsfiddle.net/bloodygeese/ecscY/56/ it looks like I have
I've got this jsfiddle set up with my issue: http://jsfiddle.net/7MjN6/ As you can see,
As you can see in this jsfiddle , when you click the menu button,
I have this script I am using for a horizontal accordion. You can see
I have a item model and each item can have many items. This can

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.