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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:04:14+00:00 2026-05-30T22:04:14+00:00

I am having difficulty getting 3 divs to automatically resize when resizing the browser

  • 0

I am having difficulty getting 3 divs to automatically resize when resizing the browser window/page.

I have two divs of fixed size and I want the centre div to automatically resize to fill the remaining space and not have the third div wrap to a newline when the page size shrinks.

I will set a min-width property on the div that wraps the three divs to prevent the wrapping of the third div once the middle div is about 65px wide.

Does this have to be done with javascript because I am currently trying to achieve this with css but am having no luck.

the javascript or css expression would be something like width = page.width – div1.width -div3.width but I would like to avoid using js if possible.

Thanks for any help!

Mike

You can see the expected behavior in the attached image.

1) What I want
2) What I am currently experiencing on shrinkage

1)expected div behavior 2)current div behaviour

I have the div re-sizing and a textbox inside set at 100% so that it re-sizes with the div.

However the right side div can either be 267px as shown below or 192px (discrete) should I just set the margin-right with code behind on certain pages? Or is there a way to make the margin-right be dynamic based on the size of the the div right?

eg.
HTML

<div id="wrapper">
  <div id="left"></div>
  <div id="right"></div>
  <div id="centre">        
  <div>
</div>

CSS

#wrapper
{height:84px;
 background-image:url(../images/siteImages/header_back.png);
 background-repeat: repeat-x;}

#left
{height:inherit;
 width:512px;
 background-image:url(../images/siteImages/logo.png);
 background-repeat: no-repeat;
 float:left;}

#centre
{width:auto;
 margin-left:512px;
 margin-right:267px;
 height:inherit;}

#right
{padding-right:10px;
 height:inherit;
 float:right;
 text-align:right;}
  • 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-30T22:04:15+00:00Added an answer on May 30, 2026 at 10:04 pm

    You could have something like:

    <div id="a">...</div>
    <div id="c">...</div>
    <div id="b">...</div>
    

    With this CSS:

    #a { width: 512px; float: left; }
    #b { width: auto; margin-left: 512px; margin-right: 200px;}
    #c { width: 200px; float: right; }
    

    Which I believe would do what you are looking for.

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

Sidebar

Related Questions

I'm having difficulty getting a 100% page height including contained divs. What seems to
I am having difficulty getting my page to show up correctly at various browser
I'm having difficulty getting widgets in a QDialog resized automatically when the dialog itself
Having difficulty articulating this correlated subquery. I have two tables fictitious tables, foo and
I'm having difficulty getting some JavaScript features to work in any other browser besides
I'm having real difficulty getting the eclipselink.join-fetch hint to work in glassfish. I have
I'm having difficulty getting the GUI layout results I want in an Android app.
I am having some difficulty getting the values of two text inputs: <form action=search.php>
I'm having difficulty getting XQuery to work. I downloaded Saxon-HE 9.2. It seems to
I'm having great difficulty getting my Android application to play videos from the SD

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.