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

  • Home
  • SEARCH
  • 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 9045139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:11:46+00:00 2026-06-16T11:11:46+00:00

Basically, I want two different elements in the leftmost area of a div, and

  • 0

Basically, I want two different elements in the leftmost area of a div, and two for the rightmost area of a div.

However if I use float:left and float:right twice, I get the following:

   ELEMENT                                   ELEMENT

          ELEMENT                     ELEMENT 

rather than

   ELEMENT                                    ELEMENT

   ELEMENT                                    ELEMENT

This is because, when I float for the second time the css floats for the remaining space left.

How do I fix this bug?

  • 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-16T11:11:52+00:00Added an answer on June 16, 2026 at 11:11 am

    You can use clear:both; with float:left; property.

    Try Jsbin demo

    .left {
       float:left;
       width:40%;
       height:240px;
       border:1px solid red;
    }
    
    .right {
       float:right;
       width:40%;
       border:1px solid red;
       height:240px;
    } 
    
    .elem1 {
       float:left;
       margin-bottom:20px;
    }
    
    .elem2 {
       float:left;
       clear:both;
    }
    
    .elem3 {
       float:left;
       margin-bottom:20px;
    }
    
    .elem4 {
       float:left;
       clear:both;
    }
    <div class="left">
        <div class="elem1">element 1</div>
        <div class="elem2">element 2</div>
     </div>
     <div class="right">
        <div class="elem3">element3</div>
        <div class="elem4">element4</div>
    </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I want a class to be able to implement two different versions of
Basically I want to split a square div diagonally in two resulting in two
I have those two html radio buttons and textarea. I basically want to enable
I've been struggling with this for a while. Basically, I want to have two
I have two action methods that are conflicting. Basically, I want to be able
Is this even possible? Basically, I want to turn these two calls to sub
I want to run a Flask instance that listens in two different ports, I
Having loaded two different images I want to do the following operation and obtain
I use Klazuka/Kal controller for selection dates.when I add events from two different arrays.so
I've created a custom button in my Android app that has basically two different

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.