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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:45:39+00:00 2026-06-03T22:45:39+00:00

this is my age-old problem and I’ve never found a real solution for this

  • 0

this is my age-old problem and I’ve never found a real solution for this so I’m finally just asking for help.

HTML

<section class="cols-2">
        <div class="wrapper">
            Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
        </div>

        <div class="wrapper">
            Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
        </div>
</section>
<section … 

CSS

.cols-2 .wrapper {
        margin:0;
        float: left;
        width: 50%;
    }

So I have two columns that are floated inside of my section.cols-2. In this case the section doesn’t have an automatic height!

e.g. if I want another section with flaots immediately after this one I can’t apply a margin between the two sections.

I don’t want to apply a height value, I just need both sections to be apart from each other by a specific margin.

See my example: http://jsfiddle.net/kWtev/

Thank you for your tipps and tricks, I appreciate it.

  • 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-03T22:45:41+00:00Added an answer on June 3, 2026 at 10:45 pm

    You need to clear the floats. This is not only your age-old “problem”, but every sitebuilder’s. But luckily, age-old problems have age-old solutions.

    There are several clearing techniques available on the Internet, one of the most common is using overflow: hidden on the container. One of the “magic” side effects of overflow: hidden is clearing floats.

    .cols-2 { overflow: hidden; }
    

    jsFiddle Demo


    Of course you could simply use clear: left, and there will be space between the containers, but the last one still won’t have a nonzero height.

    .cols-2 { clear: left; }
    

    Some clearing techniques solve this by inserting another element (like an empty div or a pseudo-element) that has clear: left applied on it.

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

Sidebar

Related Questions

This is an age old problem - but now I'm using scriptaculous its come
I'm trying to calculate age in flex. I've found this previous question What is
This has been an age old question and I am aware of the usual
I know this must be an age-old, tired question, but I cant seem to
I've been running into the age-old problem of cross-browser compatibility ever since I began
This will appear to be the age old question (which it is :)) that
This is an age-old question, but I'm still having trouble with it. You see,
While this stems from the age-old debate between Java and .NET, I'm interested in
I have a problem with one of my websites. http://www.weddingguest-book.com I only found this
I have the following code: function Person(){ this.age = 30; } function Stats(){ this.age

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.