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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:10:15+00:00 2026-06-12T10:10:15+00:00

To make the issue easier to analyze I have created this jsFiddle : Code:

  • 0

To make the issue easier to analyze I have created this jsFiddle:

Code:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <style>
        body {margin:0; }
        #mainContainer { position: absolute; right: 4%; left: 4%; height: 100%; }
        #headerContainer { width: 100%; z-index: 10; position: absolute; background: #323232; color: white; height: 30px; }
        #middleContainer { height: 100%; }
        #leftSection { position: absolute; float: left; width: 175px; background: #71ABD1; height: 100%; overflow: auto; color: black; padding-top: 30px; }
        #middleSection { position: absolute; height: 100%; background-color: yellow; left: 175px; right: 175px; color: black; padding-top: 30px; }
        #rightSection { float: right; height: 100%; width: 175px; border-left: 1px dotted black; background: red; color: black; padding-top: 30px; }
        #footerContainer { position: absolute; bottom: 0; width: 100%; height: 30px; background: #323232; color: white; }
    </style>
</head>
<body>
    <div id="mainContainer">
        <div id="headerContainer">
            headerContainer
        </div>
        <div id="middleContainer">
            <div id="leftSection">
                leftSection
            </div>
            <div id="middleSection">
                middleSection
            </div>
            <div id="rightSection">
                rightSection
            </div>
        </div>
        <div id="footerContainer">
            footerContainer
        </div>
    </div>
</body>
</html>

With the markup of top, middle, and bottom sections, problem is:

1- As you can see the footer colored in black is not really on the bottom of the page despite having position:absolute and bottom:0px on the footer div

2- More importantly, leftSection, middleSection and rightSection DIVs overlap with the header and footer DIVs, in fact, in this fiddle the only way to see the text displayed of the 3 middle sections is to have padding placed to avoid having it displayed underneath the header DIV.

I have tried placing top and bottom values of 30px on middleContainer to fix the overlap issue but this does not solve the problem, all I want is to keep headerContainer on top and footerContainer on the bottom while all the 3 middle sections adjust to 100% height. leftSection and rightSection have fixed width, but middleSection has flexible width and height.

  • 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-12T10:10:16+00:00Added an answer on June 12, 2026 at 10:10 am

    http://jsfiddle.net/grc4/XTQuT/2/ does what I wanted exactly without specifying solid height values.

        <!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
          <style>
        body {
        margin: 0;
        height:100%;
        }
    #mainContainer {
        position: absolute;
        right: 4%;
        left: 4%;
        height: 100%;
    }
    #headerContainer {
        width: 100%;
        position: relative;
        background: #323232;
        color: white;
        height: 30px;
    }
    #middleContainer {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 30px 0;
    }
    #leftSection {
        float: left;
        width: 175px;
        background: #71ABD1;
        height: 100%;
        overflow: auto;
        color: black;
    }
    #middleSection {
        position: absolute;
        background-color: yellow;
        left: 175px;
        right: 175px;
        top: 0;
        bottom: 0;
        color: black;
    }
    #rightSection {
        float: right;
        height: 100%;
        width: 175px;
        border-left: 1px dotted black;
        background: red;
        color: black;
    }
    #footerContainer {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 30px;
        background: #323232;
        color: white;
    }​
    </style>
        </head>
        <body>
            <div id="mainContainer">
                <div id="headerContainer">
                    headerContainer
                </div>
                <div id="middleContainer">
                    <div id="leftSection">
                        <div style="margin-top: 30px;">leftSection</div>
                    </div>
                    <div id="middleSection">
                        <div style="margin-top: 30px;">middleSection</div>
                    </div>
                    <div id="rightSection">
                        <div style="margin-top: 30px;">rightSection</div>
                    </div>
                </div>
                <div id="footerContainer">
                    footerContainer
                </div>
            </div>
        </body>
        </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue. I am getting data from a MySQL database, and make
I have an issue. We have a website, where person can login and make
I am having issues with understanding how to make this happen. Basically we have
I have found a few threads in regards to this issue. Most people appear
I have an engine that has quite a few dependencies. To make it easier
In attempting to make some Swing code more readable, I have made an InlineGridBagConstraints
I've tried to put this in generic terms to make it easier to understand.
I am trying to make the game Asteroids. My issue I have right now,
I'm using CMake 2.8 and having an problem when I issue a 'make install/strip'.
I am having an issue trying to make a small text-fantasy type game involving

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.