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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:48:38+00:00 2026-05-31T17:48:38+00:00

So I have 3 divs contained inside a containing div like such: <div id=contain>

  • 0

So I have 3 divs contained inside a containing div like such:

<div id="contain">
    <div id="leftnav">
    ....
    </div>
    <div id="todo">
    ...
    </div>
    <div id="rightcontent">
    ....
    </div>
</div>

The css is as follows:

div {
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;    /* Firefox, other Gecko */
box-sizing: border-box;         /* Opera/IE 8+ */
}

#contain {
    width: 1000px;
    background: #ffffff;
    display: block;
    min-height: 500px;
    height: auto;
    max-height: 1500px;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    }

#leftnav, #todo {
    float: left;
    width: 20%;
    display: block;
    overflow: hidden;
    height: 100%;
    padding: 10px;
    position: absolute;
    left: -200px;
    bottom: 0;
    }
#rightcontent {
    float: right;
    width: 100%;
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    padding: 10px;
    }

Now, the reason the #leftnav and #todo are positioned the way they are is because they are being animated to the right based upon their left value if the user clicks on the link, and the right content is just shown all the time. However, this is where the problem comes in.

I need the containing div to expand in height based upon the content in the #rightcontent div up to the max-height. As it stands, it is simply constantly keeping the height at 500px no matter what, and implementing scroll bars (which I do not want to have occur). Maybe I am approaching this all wrong, and putting an overflow: hidden on it still keeps it set to 500px no matter what.

I can provide more info if needed. Thanks in advance.

  • 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-31T17:48:40+00:00Added an answer on May 31, 2026 at 5:48 pm

    Looks like you have a problem with floats. When you float elements they break out normal rendering flow. Just as a test add float:left to your #contain div. You should see it expand to contain its children divs.

    I generally try to avoid using floats for this very reason.

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

Sidebar

Related Questions

I want to have 3 divs aligned inside a container div, something like this:
I have a div container inside which there are several child divs with css
I want to have 3 divs aligned inside a container div, like this: [[LEFT]
I have a div that contains inside 3 'floated' divs. The containing div has
I have a div (.header) contained within other divs. When my page loads, momentarily
I have a div that contains two other divs,, like this: ---------------------------- | |
I have an ASP.NET repeater, which contains 3 divs inside the ItemTemplate. Each div,
I have four divs contained in another div, and I want the four inner
I have 2 divs that I want to centre vertically inside another div. At
I have a div. Inside the div is another group of divs that each

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.