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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:40:38+00:00 2026-06-12T08:40:38+00:00

I know it’s difficult to understand the problem from the title, so I will

  • 0

I know it’s difficult to understand the problem from the title, so I will explain it in real example.

  1. The server generates DIVs with contents and sends to the browser.
  2. Each DIV has same class: eg. ‘.column‘.
  3. All DIVs have “almost” same height. One can be slightly taller or shorter than the other.

The goal is to force FLOAT:left all columns even if the first column above is taller than its siblings. See the below screenshot.

screenshot

In the above image you can see that Col4 is NOT under Col1 because Col1’s height is taller than its siblings’. Is there a way to force Col4 DIV be floated left under Col1 DIV?

I’m looking for a native CSS solution if possible. And I don’t need simple solution like creating 3 columns and pushing DIVs into each one.

If it’s really impossible, I would really appreciate if you could answer why Col6 is not “sticking” up to Col1?

The above can be obtained from:

.col{
  float:left;
  height:50px;
  width:130px;
  border-left: 1px solid;
  border-bottom: 1px solid;
}

.col1{
  height:60px
}

And HTML:

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="col col1">Col1</div>
  <div class="col">Col2</div>
  <div class="col">Col3</div>
  <div class="col">Col4</div>
  <div class="col">Col5</div>
  <div class="col">Col6</div>
</body>
</html>

Here is the live example in jsbin.

I would really appreciate any help.

  • 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-12T08:40:40+00:00Added an answer on June 12, 2026 at 8:40 am

    You should simply be able to clear the floats:

    .col:nth-child(4) {
      clear: left;
    }
    

    If you need to support older browsers, use this selector instead:

    .col1 + .col + .col + .col {
      clear: left;
    }
    

    If you need your 5th and 6th columns to be flush with the bottom borders of your 2nd and 3rd columns respectively, though, you can’t achieve it with floats alone. You’ll need to find another way around it, or use something like jQuery Masonry to lay out your page.

    The only possible reason why your 6th column isn’t sticking up to your 1st column is because it’s wrapping to a new line, and according to the float model a box cannot be higher than the bottom of its preceding floated boxes.

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

Sidebar

Related Questions

I know the title is confusing so I'll try to explain better. Here's basically
I know the title is not great but I think the code will come
i know there is many types of encode and decode and from what i
I know that we can stop inheritance of the web.config files from the root
I know this is a common problem. I've been looking at the various solutions
I know the title is Very wide - spanning over a lot ! And
Know of any tutorials or resources to configure Openfire Server to use it's built
I know how to slice array with numpy, for example v[1, :, :] now
Does anyone know how can I replace this 2 symbol below from the string
I know that you can use DirectoryIndex example.html in .htaccess, but what I need

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.