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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:04:57+00:00 2026-06-15T23:04:57+00:00

I am trying to make a fluid layout that has no fixed height or

  • 0

I am trying to make a fluid layout that has no fixed height or width elements. The body of my page is divided into three columns (and since I want them all to be equal heights, I’ve decided to use css tables). However, when I try and add a 100% height property to the table div (or the table-cell divs) they don’t expand to the full size of div.middle. I have made a JS fiddle for this question with the full code http://jsfiddle.net/3NMw5/, but here is a snippet:

<body>
    <div class='titleBar'>
        <div class='wrap'>
            <img src='../images/logo.png' />
        </div>
    </div>
    <div class='middle'>
        <div class='wrap mainContent'>
                <div class='leftColumn'>left here</div>
                <div class='center'>center</div>
                <div class='rightColumn'>right</div>
        </div>
    </div>
    <div class='footerBar'><div class='wrap'>footer</div></div>
</body>

and the css:

div.mainContent { display: table; height: 100%;}
div.leftColumn { width: 20%; display: table-cell; background-color: #D2B48C; margin: 0; padding: 0;}
div.rightColumn {width: 20%; display: table-cell;}
div.center {width: 60%; display: table-cell;}
  • 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-15T23:04:59+00:00Added an answer on June 15, 2026 at 11:04 pm

    Try adding height: 200px; to mainContent.

    div.mainContent {
    display: table;
    height: 200px;
    }
    

    Here is the jsFiddle for the code.

    Adding height: 100%; should also work.

    Your problem was not that the columns were not stretching to full height, but rather that mainContent was not fully stretching.

    —

    EDIT: Okay, so the real problem comes when you try and make your container that fluid, because height is harder for a browser to calculate than width.

    The problem occurs when you set a percentage height on an element who’s parent elements don’t have heights set. In other words, the parent elements have a default height: auto;. You are, in effect, asking the browser to calculate a height from an undefined value. Since that would equal a null-value, the result is that the browser does nothing.

    In order to define the height of the div to a relative height, you must set the height of the parent elements as well.

    By adding height: 100% to .middle, you get something close to what you are after. See the jsFiddle here.

    Read more about the height issue here.

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

Sidebar

Related Questions

I'm trying make an entity with doctrine that has three associations with other entities
I am trying to make a 3 column layout with the 2 fixed width
I'm trying to make a fluid grid layout and I've run into a problem
I'm trying to make a web page with a fixed header and a scrollable
I'm trying to make my footer run the whole width of the web page
I am trying to make a grid that takes up 100% of the width
I have two divs as follows: fluid width content fixed width content I'm trying
Trying to make a make generic select control that I can dynamically add elements
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I'm pretty new to Java and Android. I'm trying to make an app that

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.