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

  • Home
  • SEARCH
  • 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 7930001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:16:31+00:00 2026-06-03T20:16:31+00:00

I have the follow HTML: <div id=menu> <ul class=menu> <li class=item-101><a href=/>Home</a></li> <li class=item-113><a

  • 0

I have the follow HTML:

<div id="menu">
    <ul class="menu">
        <li class="item-101"><a href="/">Home</a></li>
        <li class="item-113"><a href="/sobre">Sobre</a></li>
        <li class="item-114"><a href="/portfolio">Portfolio</a></li>
        <li class="item-115"><a href="/bastidores">Bastidores</a></li>
        <li class="item-116"><a href="/blog">Blog</a></li>
        <li class="item-117"><a href="/contato">Contato</a></li>
    </ul>
</div>

and CSS:

#menu{width:900px;margin:0 auto;}
#menu ul{margin:0;padding:0;}
#menu li{float:left;margin:10px;}
#menu .item-115, #menu .item-116, #menu .item-117{float:right;}

I want 3 menus floating left and 3 floating right, but they are reverting order.

How to do this?

  • 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-03T20:16:33+00:00Added an answer on June 3, 2026 at 8:16 pm

    Here’s what I suggest: http://jsfiddle.net/thirtydot/w64Nb/2/

    The HTML is identical to what’s in your question.

    No, .item-{uid-for-menu} are random, but for each li I can float with jquery last tree menu. – Gabriel Santos

    @thirtydot assume the class always will be the same, and suggest one
    solution, then, I adapt my javascript to generate the same class as my
    sample class. – Gabriel Santos

    Instead of relying on certain classes being present, or forcing them to be the same using JavaScript, you can just solve the whole problem with jQuery (which in a different comment, you said you have available):

    $($('#menu li').slice(-3).get().reverse())
        .addClass('right').remove().appendTo('#menu .menu');​
    

    That will take the last three li inside #menu, add the .right class (which is just float: right), and reverse the order in the HTML.

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

Sidebar

Related Questions

I have a html file like following: <form action=/2811457/follow?gsid=3_5bce9b871484d3af90c89f37 method=post> <div> <a href=/2811457/follow?page=2&amp;gsid=3_5bce9b871484d3af90c89f37>next_page</a> &nbsp;<input
I have the follow HTML <div>This is some <span>special <a href=#>text</a></span> and it's super</div>
If I have a drop down list as follows <div class=editor-label> <%= Html.DropDownListFor(model =>
I have the follow structure: <div class=cardapio-content> <h5>Tittle of tab 1</h5> <p>Content of tab
I have the follow HTML <div id=outerID> <input id=inner1 type=text value=button1/> <input id=inner2 type=text
I have HTML like the following on my website: <div class=groups> <div class=group> Group
I need some help...I did the follow: <div class=tabs> <ul> <li><a id=tb-1 position=1 href=tabs-1>
I have the follow html structure: <div id=container> <div id=block1> <img src=someimage/path /> </div>
I have a HTML snippet as follows, I want to take the 'article-form' div,
If I have a block of HTML like:- <div id=t1> <div> <input type=text value=Bla/>

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.