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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:09:52+00:00 2026-06-06T22:09:52+00:00

I want to split a series of divs vertically: My HTML might look like

  • 0

I want to split a series of divs vertically:

My HTML might look like this:

<div>A</div>
<div>B</div>
...
<div>G</div>

I want them to look like this

A D G
B E
C F

The number of elements is arbitrary and I would like to avoid having to add extra attributes on certain of the divs if possible, as that would increase complexity greatly.

I’ve looked at the CSS3 columns option, but is there any way to do this without CSS3? I would prefer to avoid Javascript libraries as well.

  • 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-06T22:09:53+00:00Added an answer on June 6, 2026 at 10:09 pm

    Assuming that you want it to be dynamic, there is no sane way to replicate such a layout without relying on CSS3 Columns or JS (plugin or otherwise).

    tbowman’s suggestion of using floats and specified widths would result in a different order of items:

    A B C
    D E F
    G
    

    This could however work perfectly well if you could use jquery to rearrange the items wrap items into columns as needed (the logic could be replicated in vanilla javascript). Bonus points if you use AJAX to retrieve this content and wrap content into columns before they’re added to DOM so that there’s no annoying flicker.

    var $container = $('#container'); //assuming this is the parent
    var $content = $container.children();
    var itemsPerColumn = (Math.ceil($content.length / 3));
    for (var i = 0; i < 3; i++) {
        $content.slice(i * itemsPerColumn, (i + 1) * itemsPerColumn)
        .wrapAll('<div class="column" />');
    }
    

    Fiddle’d with delayed rendering for comparison. Page would remain usable with “normal” layout if js fails for some reason.

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

Sidebar

Related Questions

I want to split a string like this: abc//def//ghi into a part before and
I have data like this [{search:true,hidden:true,index:xyz},{search:true,hidden:true,index:pqr,address:{city:xxxx}}] I want split data to get: {search:true,hidden:true,index:xyz} {search:true,hidden:true,index:pqr,address:{city:xxxx}}
I want split a string like this: C:\Program\files\images\flower.jpg but, using the following code: String[]
I have code like that 010200345 i want split every first three digit please
I want to split a file(suppose a mp3) into four parts.I have tried this
i have an array which contains different values, i want split them off and
I want to split a large string by a series of words. E.g. $splitby
I want split integers into their factors. For example, if the total number of
I want split a string to array by Case Sensitivity. like $str = 'CreateTechBook'
I want to split this String to words public static 9 Scanner input =

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.