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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:07:08+00:00 2026-05-18T20:07:08+00:00

I have a parent div (container) that has a child div (inner) which also

  • 0

I have a parent div (container) that has a child div (inner) which also has child divs that are dynamically created. I am using jquery to scroll horizontally on the overflow from #inner. My problem is that while I don’t want #container to expand horizontally, I do want it to expand vertically however it won’t expand to the full height of #inner. I have tried adding a clear div just after #inner but that didn’t work. I also tried changing the display for #container to display:inline and display:inline-block. Inline vertically expanded #container to the proper height but basically changed the overflow to auto so that you would see the horizontal scroll bar on the bottom even though overflow was set to hidden. My goal is to have a vertical scroll bar and no horizontal scroll bar while having #container vertically expand to it’s child content. Does that make sense? Here is my markup…

<div id="container">
   <div id="inner">
       <div class="post">
           <p>content</p>
       </div>
       <div class="post">
           <p>content</p>
       </div>
       <div class="post">
           <p>content</p>
       </div>
   </div>
   <div class="clear"></div>
</div>

and the css…

body {
    margin:0;
    padding:0;
    height: 100%;
    line-height: 1.2em;
    font: normal 12px 'Helvetica','Arial','Verdana','sans-serif';
    color:#E0DFE3;
    background:#dad3c1 url(../images/duck-bg1500x.jpg) no-repeat fixed;
}
#container {
    overflow:auto;
    border:#888888 solid 1px;
    margin:10px;
}
#inner {
    position:relative;
    top:100px;
 width:3600px;
    margin:0;
    padding:0;
}
.post {
    background:url("http://www.loodieloodieloodie.com/images/opac-bg2.png") repeat scroll transparent !important;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    -moz-box-shadow: 5px 5px 5px #888;
    -webkit-box-shadow: 5px 5px 5px #888;
    box-shadow: 5px 5px 5px #888;
    width: 600px;
    padding: 20px;
    position: relative;
    top:50px;
    margin: 0 25px;
    float:left;
}
.clear {
    clear:both;
}

Thank you in advance for any and all help,
B

  • 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-18T20:07:08+00:00Added an answer on May 18, 2026 at 8:07 pm

    I think your issue is coming from using relative positions on your child elements. If you switch them to use margins for positioning, the container will hold the content a little more like you want it to (I think). Give this css a shot!

    body {
        margin:0;
        padding:0;
        height: 100%;
        line-height: 1.2em;
        font: normal 12px 'Helvetica','Arial','Verdana','sans-serif';
        color:#E0DFE3;
        background:#dad3c1 url(../images/duck-bg1500x.jpg) no-repeat fixed;
    }
    #container {
        overflow:scroll;
        border:#888888 solid 1px;
        margin:10px;
    }
    #inner {
        width:3600px;
        margin:0;
        padding:0;
    }
    .post {
        background:url("http://www.loodieloodieloodie.com/images/opac-bg2.png") repeat scroll transparent !important;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 5px 5px 5px #888;
        -webkit-box-shadow: 5px 5px 5px #888;
        box-shadow: 5px 5px 5px #888;
        width: 600px;
        padding: 20px;
        position: relative;
        margin: 50px 25px;
        float:left;
    }
    .clear {
        clear:both;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a parent div (container) that has a child div (inner) which also
I have a jQuery draggable container div with a side scroll bar that should
I have a div with a child div inside it. I'm using jQuery to
I have a div ( parent ) that contains another div ( child ).
I have div that contains 2 divs in it. One of the child divs
I have noticed that both IE6 and IE7 push the parent div down when
There has to be a simple explanation for this. I have a parent <div>
I have a parent object which has a one to many relationship with an
I have a table which defines a child-parent relationship between nodes: CREATE TABLE node
When you have parent-child tables and you wish to use a DetailsView to edit

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.