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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:34:01+00:00 2026-05-28T02:34:01+00:00

I have menu with few unordered list items as shown below. Now I need

  • 0

I have menu with few unordered list items as shown below.

enter image description here

Now I need home menu to be placed on the left and the rest of the items on the right side.
How do I do that? Here is my menu CSS:

.menu{
    position: absolute;
    top:10px;
    left:315px;
    width:920px;
    border: 1px solid #d6d6d6;
    background: #fff;
    padding: 15px;
    -webkit-box-shadow: 0 3px 6px rgba(0,0,0,.25);
    -moz-box-shadow: 0 3px 6px rgba(0,0,0,.25);
    border-radius : 7px;
    -moz-border-radius : 7px;
    -webkit-border-radius : 7px;
    background : -webkit-gradient(linear, left top, left bottom, from(rgb(240,240,240)), to(rgb(204,204,204)));
    background : -moz-gradient(linear, left top, left bottom, from(rgb(240,240,240)), to(rgb(204,204,204)));
    height: 18px;
}
.dark {
    background : rgb(89,89,89);
    background : -webkit-gradient(linear, left top, left bottom, from(rgb(89,89,89)), to(rgb(54,54,54)));
    background : -moz-gradient(linear, left top, left bottom, from(rgb(89,89,89)), to(rgb(54,54,54)));
    border: 1px solid #272727;
}
a {
    text-decoration: none;
    color: #262626;
    line-height: 20px;
}
ul {
    margin: 0;
    padding: 0;
    z-index: 300;
    position: absolute;
}
ul li {
    list-style: none;
    float:left;
    text-align: center;
} 
ul li a {
    padding: 0 20px;
    text-align: center;
}

This is how my markup is:

<div class="menu dark">
 <ul >
        <li><a href="">Home</a></li>
        <li><a href="">Item1</a></li>
        <li><a href="">Item2</a></li>
        <li><a href="">Item3</a></li>
        <li><a href="">Item4</a></li>
        <li><a href="">Item5</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-05-28T02:34:02+00:00Added an answer on May 28, 2026 at 2:34 am

    There wasn’t enough CSS to fully reproduce your screen shot, but the basic formula should be something like this:

    .menu ul {
        text-align:right;
    }
    .menu li {
        display:inline-block;
    }
    .menu li:first-child {
        float:left;  
    }
    

    Demo: http://jsfiddle.net/TLS3Y/

    You could do something with .menu li { float:right; } instead of display:inline-block;, but then the order of your menu items will be reversed.

    There’s another way you can do it that might actually be a bit more solid, because inline-block can be dicey:

    .menu {
        position:relative; /* contain absolutely positioned elements */
    }  
    .menu ul {
        float:right;
    }
    .menu li {
        float:left;
    }
    .menu li:first-child {
        position:absolute;
        left:15px; /* Match your padding on <ul> */
        top:15px;
    }
    

    Demo: http://jsfiddle.net/TLS3Y/3/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a popup menu that has a few items in it. Option 1
I have a context menu with a few items. One of the items has
I have a status menu with a few items inside of all. All of
I have this asp:menu with a few items and want to be able to
I have a menu of report links in my master page. I need to
I have a context menu with a few selections. If the user picks a
Hi I have a flash menu showing a few links, but when the user
I need to put an image and text to WPF Ribbon Menu. I have
I have a menu with a few JCheckBoxMnuItems. How do I ensure that the
I have a few combo-boxes and double spin boxes on my Qt Dialog. Now

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.