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

  • Home
  • SEARCH
  • 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 7743199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:28:15+00:00 2026-06-01T09:28:15+00:00

I am looking for a general and complete solution to this common problem! I

  • 0

I am looking for a general and complete solution to this common problem! I have HTML code like this:

<div id="CONTAINER">
    <div id="CONTAINER_LEFT"></div>
    <div id="CONTAINER_RIGHT"></div>
    <div id="CONTAINER_CENTER"></div>
</div>

I want to write CSS that lets me align the inner div elements vertically so their top edges are in line. Other considerations:

  1. The Left and Right containers have fixed width.
  2. The Center container has to fill the remaining width between Left and
    Right containers.
  3. The height of each inner container depends upon its content
    and so varies between containers.
  4. No overlapping is intended, the aim is something like the following
    image.
  5. The height of the outer container should be equal to the greatest height
    of inner containers, if it is possible!!

top edges line up

The colors are just for displaying the idea!

I used “float: left;” and “float: right;” properties for the Right and Left containers but if the Center container has too much content, the area of this container fills the space below the floated elements! Also, I need a footer below the root container with width of 100%; any solution should consider 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. Editorial Team
    Editorial Team
    2026-06-01T09:28:16+00:00Added an answer on June 1, 2026 at 9:28 am

    This seems to be the simplest solution and works under IE7-9, FF, Chrome, Safari and Opera:

    .container {
       overflow: hidden;
       background: grey;
    }
    
    .left {
       float: left;
       width: 200px;
       background: red;
    }
    
    .middle {
       margin-left: 200px;
       margin-right: 200px;
       background: green;
    }
    
    .right {
       float: right;
       width: 200px;
       background: blue;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a general solution for upgrading database schema with ORM tools, like
I am looking for some general guidance on this one... I have created a
I'm looking for a general purpose API/web service/tool/etc... that allows convert a given HTML
Looking for a toolkit/SDK for general Blackberry development or application toolkits. Anything like an
I'm looking for a general solution for updating one large data frame with the
I would like to add index(s) to my table. I am looking for general
I am a complete Android and C in general noob, I have done a
What does code in PHP, such as /(?<!\..|\...|\....)([\?\!\.]+)\s(?!.\.|..\.|...\.)/u mean? I'm looking for general documentation,
So I've seen this question , but I'm looking for some more general advice:
Looking for a general purpose WPF toolset. Currently looking at Telerik and Infragistics. Are

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.