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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:28:56+00:00 2026-06-13T09:28:56+00:00

I hope you can help me out with a CSS problem I’m trying to

  • 0

I hope you can help me out with a CSS problem I’m trying to solve.

I have a set of divs, let’s say 4 for this example. I want to structure them in two vertical columns on a page, without using container divs around each of the columns.

However (here’s the tricky part), I want them to be arranged so that each div falls exactly below the one above it. At the moment, I’ve got it so that they line up with each other along the top.

Take a look here for the code & example.

It works fine unless one of the divs on the left is longer than the div on the right, as shown in the example.

So… my problem is. How do I get it so that the green box is positioned directly underneath the blue box, rather than inline with the top of the yellow box.

I don’t want to use margin-top: -60px or similar.

Using JavaScript/jQuery is fine if necessary, but a pure CSS solution would be ideal.

The important thing to remember is that I can’t use container divs around the columns.

I’m not even sure this is possible, and have wasted a day trying to get it to work… if you could help, I would be very grateful – even if you just confirm it isn’t possible!

  • 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-13T09:28:57+00:00Added an answer on June 13, 2026 at 9:28 am

    There are 2 solutions, CSS3 and no support for older browsers, or a jQuery plugin.

    With CSS3 Columns

    #wrapper{
        column-count: 2;
        column-gap: 10px;
    }
    

    Or for greater compatibility, with vendor prefixes:

    #wrapper{
        -webkit-column-count: 2;
        -moz-column-count: 2;
        column-count: 2;
        -webkit-column-gap: 10px;
        -moz-column-gap: 10px;
        column-gap: 10px;
    }
    

    View example on CSSDesk

    with jQuery plugins

    1. As @allaire noted, Masonry in an excellent library.

    2. Then there is Wookmark, havent tested it but looks very clean.

    3. Or this jQuery.column plugin that mimics the CSS3 column behavior. (havent tried this one yet either)

    And there are a lot more plugins that do columnizing, search around for masonry alternatives to find your pick.

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

Sidebar

Related Questions

Hope someone can help me out with this problem I am having. I just
Hope someone can help me out of this issue. Im trying to get data
I hope somebody can help work out to do this. Basically, I have a
I hope someone can help me out. I have a table that logs our
i have a problem so hope you guys can help! I have a string
I have a question and I hope someone can help me out. What I
Hi hope someone can help out with this one: What I basically want is
I really hope someone here can help out with this. I'm using Magento 1.6.1.0
this is my first post on stackoverflow, I hope you can help me out!
I have a problem with generics in C# I hope you can help me

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.