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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:05:02+00:00 2026-05-11T05:05:02+00:00

I want to put two <div> s next to each other. The right <div>

  • 0

I want to put two <div>s next to each other. The right <div> is about 200px; and the left <div> must fill up the rest of the screen width? How can I do this?

  • 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. 2026-05-11T05:05:03+00:00Added an answer on May 11, 2026 at 5:05 am

    You can use flexbox to lay out your items:

    #parent {   display: flex; } #narrow {   width: 200px;   background: lightblue;   /* Just so it's visible */ } #wide {   flex: 1;   /* Grow to rest of container */   background: lightgreen;   /* Just so it's visible */ }
    <div id='parent'>   <div id='wide'>Wide (rest of width)</div>   <div id='narrow'>Narrow (200px)</div> </div>

    This is basically just scraping the surface of flexbox. Flexbox can do pretty amazing things.


    For older browser support, you can use CSS float and a width properties to solve it.

    #narrow {   float: right;   width: 200px;   background: lightblue; } #wide {   float: left;   width: calc(100% - 200px);   background: lightgreen; }
    <div id='parent'>   <div id='wide'>Wide (rest of width)</div>   <div id='narrow'>Narrow (200px)</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 divs floated left so that they appear next to each other.
Put simply, I want to select all data in two columns from each of
So, I want to set next to each other a Facebook like button (html5)
I have two divs one inside of the other, now i want to put
Hi i want to put two div in a zend view. After i want
I have a div wrapped around two children, one floated left and the other
I want to put two side by side on another (I have three )
I want to put facility to display distance between two places selected by user.
I have two jobs on Hudson, A & B. I just want to put
I have a div that i want to apply two backgrounds to it. Basically

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.