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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:15:50+00:00 2026-05-12T14:15:50+00:00

I have 3 div s, all contained within a parent They are in parent-div.

  • 0

I have 3 divs, all contained within a parent They are in parent-div.
Here’s my HTML:

<div id="header">
   <div id="left"></div>
   <div id="middle"></div>
   <div id="right"></div>
</div>

And my CSS:

#left
{
   float: left;
   width: 334px;
   background-image: ...;
}
#middle
{
   float: left;
   width: ???;
   background-image: ...;
}
#right
{
   float: left;
   width: 280px;
   background-image: ...;
}

I want the #left and #right divs to have static sizes and non-repeating backgrounds. However, the #middle div should resize depending on the page size. How can I write my CSS so that the #middle div changes its with dynamically, apart from the width of the other two divs?

  • 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-12T14:15:51+00:00Added an answer on May 12, 2026 at 2:15 pm

    I think:

    #left
    {
       float: left;
       width: 334px;
       background-image: ...;
    }
    #middle
    {
       margin-left: 334px;
       margin-right: 280px;
       background-image: ...;
    }
    #right
    {
       float: right;
       width: 280px;
       background-image: ...;
    }
    

    and then you will need to change the order of the DIVs slightly:

    <div id="header">
       <div id="left"></div>
       <div id="right"></div>
       <div id="middle"></div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fluid width container DIV. Within this I have 4 DIVs all
In my site, I have two divs - right and left. Both are contained
Hi all I have problem with my div's in html. I have set them
I have this markup: <div id=slider1> <div class=ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all> <a style=left:
Afternoon all. I have a drop down list in my view <div class=editor-label> @Html.LabelFor(model
Suppose I have this html markup: <div id=wrapper> <pre class=highlight> $(function(){ // hide all
I have a div like this: <div id=x name=x class=x style=></div> and contained within
I currently have a setup of divs within a container div, as follows: <div
Just have a small css problem... I have a couple of divs within a
I have written a web page in which links are all contained within their

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.