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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:45:57+00:00 2026-05-21T14:45:57+00:00

On a web page, I have two divs. I would like to place the

  • 0

On a web page, I have two divs. I would like to place the second div just right to the other one so that they’re in a line.

  • 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-05-21T14:45:58+00:00Added an answer on May 21, 2026 at 2:45 pm

    You can use the float CSS style. Set it to left for the first div. The second div will be placed just right of it (so long as there is enough space)

    <div>
      <div style="float: left">
         <p> This div will be on the left</p>
      </div>
      <div >
         <p> This div will be on the right</p>
      </div>
      <!-- optionally, you may need to add a "clearance" element below the floating divs -->
      <div style="clear: both" ></div>
    </div>
    

    Note, that sometimes it may be necessary to give the floating divs a fixed width in order to achieve the proper horizontal layout.

    <div>
      <div style="width: 100px; float: left">
         <p> 100px div will be on the left</p>
      </div>
      <div style="width: 200px">
         <p> 200px div will be on the right as long as there is enough 
             horizontal space in the container div
         </p>
      </div>
      <!-- optionally, you may need to add a "clearance" element below the floating divs -->
      <div style="clear: both" ></div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two jQuery autocomplete textboxes on a mvc web page. One that returns
I have two ASP.NET dropdownlists on my web page.The second one is disabled by
I need to have two different Like buttons on one web-page. First one -
On my web page I have two divs, A and B: The DOM looks
I have two web pages that I am trying to send information between. One
I have two 'nested' or 'cascaded' dialogs on my web page (one dialog opens
I have a web page with DIV s with a mouseover handler that is
Using CSS Style Sheet In my web page, i have two class like menu
i have one login.jsp web page where i have two textboxes for username and
I have a webpage with two side by side overflowing divs that split the

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.