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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:34:54+00:00 2026-05-22T14:34:54+00:00

I have an outer div position: relative; overflow: hidden; min-heigth: 450px; containing a div

  • 0

I have an outer div

position: relative;
overflow: hidden;
min-heigth: 450px;

containing a div

position: absolute;
top: 10px;
right: 10px;

The inner div is bigger than the min-heigth of the outer div and I see that the outer div is not scaling to the content of the inner div. Capping off the bottom content of the inner div.

How can I define the outer (or inner) div to scale vertically to the content (of the inner div)

Thanks

  • 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-22T14:34:55+00:00Added an answer on May 22, 2026 at 2:34 pm

    @trascher; It’s possible but you have add extra markup because when you give a child div an absolute position then it’s parent div is not consider it’s height.

    Check this http://jsfiddle.net/sandeep/6UksD/1/

    CSS:

    #outer
    {
        position: relative;
        min-height: 450px;
        background:red;
        margin:10px 0 0 10px;
        width:200px;
        overflow: hidden;
    }
    #inner
    {
        position:relative;
        background:black;
        height:600px;
        width:100px;
        margin:10px 0 0 10px;
        float:left;
    }
    #abinner
    {
        position:absolute;
        background:yellow;
        height:100%;
        width:100%;
    }
    

    HTML:

    <div id="outer">
        <div id="inner">
            <div id="abinner"></div>
        </div>
    
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html structure <div style=overflow-x:auto;overflow-y:hidden;position:relative> <div style=position:absolute; top:0;bottom:0;padding-top:30px> </div> </div> When
I have a simple HTML layout: <div style=position:relative; width:200px> <div style=position:absolute; top:0; left:0; background-color:red;
I have the following html code: <div class=outer ui-draggable style=position: relative;> <div class=inner>Foo bar</div>
what i have is this: <style> #main{position:relative; width:600px; height: 600px;} #cover{position:absolute} #image{position:absolute} </style> <div
I have the following div in my markup <div id=sectionContent style=position: absolute; margin-top: 0px;
When i have a div with position: absolute , and in it is another
I have outer div and inner div. I need to place inner div at
I have an outer div, and inside of that, I have an inner div
I have an outer div that is 800px wide. I have an inner div
I have a right outer join, that almost does what I want... SELECT users_usr.firstname_usr,

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.