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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:25:10+00:00 2026-05-14T00:25:10+00:00

I am trying to make a chatroom layout like the following: Now my problem

  • 0

I am trying to make a chatroom layout like the following:

chatroom layout

Now my problem is that I am not sure how to have the container box occupy the whole width and height (with valid doctype) and then make the center div grow if the window grows keeping the rest constant.

i am well aware of js/css. so i just need some beginning guideline. i would like to avoid javascript to process and then set heights and widths.

  • 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-14T00:25:10+00:00Added an answer on May 14, 2026 at 12:25 am
    body, html {
        height: 100%;
        margin: 0;
        padding: 0;
    }
    #container {
        height: 100%;
        height: auto !important;
        margin: 0 auto;
        min-height: 100%;
        position: relative;
        width: 100%;
    }
    .header {
        display: block;
        height: 100px;
        width: 100%;
    }
    .body-left {
        float: left;
        width: 70%;
    }
    .body-right {
        float: right;
        width: 30%;
    }
    .clear {
        clear: both;
    }
    .footer {
        float: left;
        width: 70%;
    }
    

    and HTML

    <div id="container">
        <div class="header"></div>
        <div class="body-left"></div>
        <div class="body-right"></div>
        <div class="clear"></div>
        <div class="footer"></div>
    </div> 
    

    That is it if that is what you seek

    or use the following JavaScript to find out the height and assign it to your container :

    function getWindowHeight() {
        var windowHeight = 0;
    
        if (typeof(window.innerHeight) == 'number') {
            windowHeight = window.innerHeight;
        } else {
            if (document.documentElement && document.documentElement.clientHeight) {
                windowHeight = document.documentElement.clientHeight;
            } else {
                if (document.body && document.body.clientHeight) {
                    windowHeight = document.body.clientHeight;
                }
            }
        }
    
        return windowHeight;
    }
    
    window.onload = init;
    
    function init() {
        document.getElementByID("container").style.height = getWindowHeight() + "px";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to make simple minesweeper game in python, but have one problem. I have
trying to make one horizontal box.. inside that update limits. if u see the
Trying to make a regex that can handle input like either: Beverly Hills, CA
Right now I'm trying make some browser based game. But I have little questions.
Trying to make a custom :confirm message for a rails form that returns data
Trying to make a simple program to catalogue books. Something like this, for example:
Trying to make a simple program to catalogue books. Something like this, for example:
Trying to make a toggle button that hides/shows the right window/pane. Here is a
I'm trying to make a change to an old appengine application, but now after
Trying to make simple jQuery function to create a scrollToTop button that fades in

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.