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

The Archive Base Latest Questions

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

http://jsfiddle.net/w9E4K/7/ <div id=parent> <div id=left>Left</div> <div id=right>Right</div> </div>​ #left { display: inline-block; width: 75%;

  • 0

http://jsfiddle.net/w9E4K/7/

<div id="parent">
<div id="left">Left</div>
<div id="right">Right</div>
</div>​

#left {
    display: inline-block;
    width: 75%;
    background-color: blue;
}

#right {
    display: inline-block;
    width: 25%;
    min-width: 100px;
    background-color: red;
}

#parent {
    overflow: auto;
}

​
I have two divs which I am trying to layout such that one is 3/4 of the screen and the other is 1/4. However, if the screen gets too small, I need to setup min-widths to prevent elements from shifting.

I’m wondering how to express this with CSS? The idea would be that the right-side div demands at least 100px and causes the parent div to widen to hold it.

I can swap to using floats instead of inline-blocks if this is helpful.

  • 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-16T01:31:12+00:00Added an answer on June 16, 2026 at 1:31 am
    #left {
      overflow: hidden;
      background-color: blue;
    }
    
    #right {
      float: right;
      width: 25%;
      min-width: 100px;
      background-color: red;
      margin-top: 5px; // only used to see the left div
                       // actually ending next to the right div
    }
    

    with:

    <div id="parent">
      <div id="right">Right</div>
      <div id="left">Left</div>
    </div>
    

    demo: http://jsbin.com/akamik/1/

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

Sidebar

Related Questions

http://jsfiddle.net/CApW2/ I can't get it done the right way, left and right div are
http://jsfiddle.net/gfuKS/5/ var transitionInitial = {property: none}; var rules = [color, background-color]; var transitions =
http://jsfiddle.net/3BFGU/71/ Width of the html parent element (calculated using 1$(el).width()1) is less than the
http://jsfiddle.net/n8YsM/ How do I make the div id blue take up the remaining visible
http://jsfiddle.net/Zyjwb/5/ How can I display actual names of owners , based on the specified
http://jsfiddle.net/WTELW/4/ The following works fine on JSFiddle, but doesn't seem to work right in
http://jsfiddle.net/2N854/ html: <img alt=test width=100 height=100> javascript: alert($('img').height()); On most browsers (chrome), the alert
http://jsfiddle.net/xKuwR/ I want the small clone to sit nicely within the overview div. The
http://jsfiddle.net/nicktheandroid/SsfpG/ I don't understand why these inline elements are causing the paragraph to stop
http://jsfiddle.net/ZDydm/ Here is what I'm trying to do.. div { border: 1px solid black;

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.