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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:39:14+00:00 2026-06-10T02:39:14+00:00

If I have 3 Div boxes (any number really) ordered in the following manor:

  • 0

If I have 3 Div boxes (any number really) ordered in the following manor:

<div>
    <div id="one"></div>
    <div id="two"></div>
    <div id="three"></div>
</div>

How can I make the div with id one be displayed after the div with id three without changing the structure of the html?

This is what the html should be displayed as:

________________________
| ____________________ |
| | id=two           | |
| |                  | |
| |__________________| |
| ____________________ |
| | id=three         | |
| |                  | |
| |__________________| |
| ____________________ |
| | id=one           | |
| |                  | |
| |__________________| |
|______________________|
  • 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-10T02:39:16+00:00Added an answer on June 10, 2026 at 2:39 am

    It’s possible depending on what comes after those divs. If there’s nothing there, you can use position: absolute; top: 100%; on the first div to achieve that:

    <div id="container">
        <div id="one"></div>
        <div id="two"></div>
        <div id="three"></div>
    </div>​​​
    
    ​#container { position: relative; border: 1px solid red; }
    #one { position: absolute; top: 100%; }
    #one, #two, #three { width: 300px; height: 200px; border: 1px solid #ccc; }
    

    http://jsfiddle.net/xjnrE/

    However, if there’s anything after the #container div, it will be under #one (at least partially, depending on the height; see demo).

    Keep in mind that if the element is “in the flow” (i.e., it’s not positioned and not floated), it will be rendered according to the order of appearance on the markup (and, consequently, the DOM). This means you must resort to JavaScript to change the actual position of the element in the DOM:

    var container = document.getElementById('container');
    var one = document.getElementById('one');
    container.appendChild(one);
    

    http://jsfiddle.net/xjnrE/3/

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

Sidebar

Related Questions

I have div boxes of identical heights and widths stacked up into two columns,
I have 2 div boxes. It's all working fine but when the browser is
I have a h2 tag, the a div with some boxes in and the
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
I have a few select boxes (at least 5) with the following structure <li>
How do I find out if the users have checked any of the boxes
I have created two rounded corner boxes which i would like to be aligned
I have a pretty simple div structure - tree boxes with middle box highlighted
I have a form with three text boxes. I want to have a key
I have a problem with a few div boxes displaying an overflowing/repeating image only

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.