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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:13:51+00:00 2026-05-15T10:13:51+00:00

Simple problem – How do I get these two divs to share the same

  • 0

Simple problem – How do I get these two divs to share the same line:

<div style="width: 200px; padding: 0; background-color: #f00; float: left; display: inline; ">Lorem ipsum dolor sit</div>
<div style="margin-left: 200px; padding: 0; background-color: #0f0; float: right; display: inline; ">Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis interdum leo nec purus eleifend ut laoreet metus varius. Praesent lobortis risus sem. Duis gravida risus convallis purus dapibus fermentum. Nulla nec arcu pellentesque justo hendrerit pulvinar id ac velit. Nulla cursus volutpat risus, id volutpat metus tempus eget. Morbi rhoncus, diam sed vestibulum elementum, odio nulla faucibus ligula, ut dapibus lorem nunc vitae purus. Nam commodo iaculis ultricies. Etiam in velit dolor, vel convallis tellus. Aliquam tincidunt, erat ac dictum varius, sapien mi faucibus est, sit amet venenatis nisl massa non turpis. Donec eget libero mauris. Cras ac magna est, id hendrerit est.</div>

EDIT: Additionally, I need the second (right) div to fill the remaining space, so setting width won’t work in my case. Also, I need the right div to appear as a block, such that when it wraps, it begins flush with the beginning of the first line on the right div (“Cum sociis…”).

Thanks in advance.

  • 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-15T10:13:52+00:00Added an answer on May 15, 2026 at 10:13 am

    Make them both float left, you could also try putting the float right above the float:left.

    If that doesn’t work, try putting a width on the second division.

    If that doesn’t work, send us your page, there is something else wrong.


    EDIT — this is an alternative using absolute positioning

    <div style="width: 200px; padding: 0; background-color: #f00; position:absolute;">Lorem ipsum dolor sit</div>
    <div style="margin-left: 200px; padding: 0; background-color: #0f0;">Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis interdum leo nec purus eleifend ut laoreet metus varius. Praesent lobortis risus sem. Duis gravida risus convallis purus dapibus fermentum. Nulla nec arcu pellentesque justo hendrerit pulvinar id ac velit. Nulla cursus volutpat risus, id volutpat metus tempus eget. Morbi rhoncus, diam sed vestibulum elementum, odio nulla faucibus ligula, ut dapibus lorem nunc vitae purus. Nam commodo iaculis ultricies. Etiam in velit dolor, vel convallis tellus. Aliquam tincidunt, erat ac dictum varius, sapien mi faucibus est, sit amet venenatis nisl massa non turpis. Donec eget libero mauris. Cras ac magna est, id hendrerit est.</div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very simple problem: given two CLLocationCoordinate2Ds, how can I get the bearing (as radians)
simple problem ( I hope) I have a div: with css: .break{position:relative;height:1px;background-color:#555555;margin:5px 10px 10px
I have a seemingly simple problem though i am unable to get my head
Simple problem that I can't figure out... How can I print a '%' character
Simple problem (I think): I want to be able to invoke a click method
simple problem with a simple question. I have a string, in C# i can
Really simple problem: I want to split a connection string into its keyword /
This simple problem is kiling me. I posted something earlier about trying to clean
I have a simple problem with SQL SERVER charindex function. DECLARE @VAR1 varchar SET
I have a simple problem that I have not been able to find an

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.