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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:34:33+00:00 2026-05-31T05:34:33+00:00

So, I have 2 Containers: +———–+ |               | +—+        | |     |         | |     |         | |     |         | |     |         | +—+——+ The

  • 0

So, I have 2 Containers:

+———–+
|               |
+—+        |
|     |         |
|     |         |
|     |         |
|     |         |
+—+——+

The parent hast an variable amount of content, so the child should grow to always go down to the bottom.

#logbody {
font-family: calibri;
width: 100%;
height: 85%;
background-color: #DFDFDF;
text-align: center;
padding-top: 16;
overflow: auto;
}

#menu {
float: left;
font-family: calibri;
width: 15%;
height: 100%;
background-color: #F8AA3C;
}

logbody is the parent, menu the child.
When the parent contains a lot of stuff it’ll look like this:

+———–+
|               |
+—+        |
|     |         |
|     |         |
|     |         |
|     |         |
+—+        |
|               |
+———–+

And that’s not what I want, the child should grow along. As you can see the parent is not at a 100% height since there’s another container above the parent. Actually, there’s one big continer, which is 100%. The first child is some kind of header with 12%, followed by the header, then the logbody which contains another child (the menu).

<div id=container> //100%
    <div id=header></div> //12%
    <div id=logbody> //85%
        <div id=menu></div>
    </div>
</div>

I know, this ain’t proper code, it’S just to show the structure. And yes, the remaining 3% are on purpose.

So, is there any pure-CSS solution to adapt the height of the child (menu)?

  • 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-31T05:34:35+00:00Added an answer on May 31, 2026 at 5:34 am

    I’ve added a couple of lines to your CSS and it seems to work if I’ve understood the question correctly.

    #logbody {
    font-family: calibri;
    width: 100%;
    height: 85%;
    background-color: #DFDFDF;
    text-align: center;
    padding-top: 16;
    overflow: hidden; /*This is new*/
    position: relative; /*As is this*/
    }
    
    #menu {
    float: left;
    font-family: calibri;
    width: 15%;
    height: 100%;
    background-color: #F8AA3C;
    position: absolute; /*This is new*/
    }​
    

    Note, this approach won’t expand the parent if the child’s height exceeds that of its parent what with the overflow being hidden and all.

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

Sidebar

Related Questions

I have two div containers with content in them and two buttons outside the
I have a LWUIT Form which has 3 containers, each with its own content.
I have a child DIV under several other DIV containers. I am trying to
On my website I have various containers with content <div> s text in them.
I recently learned that all stl containers have swap function: i.e. c1.swap(c2); will lead
I'd like to have the nested containers inherit that property, but when I set
I have built a custom component using some containers and a TileList. Now when
I have a module which runs standalone in a JVM (no containers) and communicates
Does anyone know why the STL containers don't have virtual destructors? As far as
Ok. I have a mainframe which contains two containers. One contains my wizard-alike buttons

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.