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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:45:36+00:00 2026-06-03T00:45:36+00:00

Can some one please explain why when I tell a div that: it’s height

  • 0

Can some one please explain why when I tell a div that:

  • it’s height is 500px and it’s max height is also 500px,

  • overflow if he needs (auto).

when put elements dynamically inside the div it’ll grow to the size it needs, regard my limits, and the entire page will scroll not the div.

why? how to fix?

Ok, sorry for the minimal details, I just got it, if using display: inline-table, it ignores all this stuff I wrote that don’t work…
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-06-03T00:45:37+00:00Added an answer on June 3, 2026 at 12:45 am

    The following seems to work just fine for me. See a demo here: http://jsbin.com/iqigen/5/edit

    <style>
      #box {
        height: 500px;
        overflow: auto;
      }
    </style>
    <div id="box"></div>
    

    When the collective height of the nested elements exceeds that of the parent, the parent will engage in overflowing. When the content overflows, a scrollbar will be shown on the parent element, obstructing any view of the child elements beyond the bounds of their container.

    You can add several dynamic elements with the following:

    var colors = [ '#F00', '#660', '#066' ];
    
    setInterval( addElement, 1000 );
    
    function addElement(){
      $("<p>", { text: new Date() })
        .css( 'background', colors[ Math.floor( Math.random() * colors.length ) ] )
        .appendTo( "#hello" );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to pass parameters to [WebMethod] in Asp.Net(C#) ? Can some one please explain
Can some one please explain, what does SVN branch, tag, merge do? Why they
can some one please explain why (some #(= 3 %) (range)) returns true but
Can someone please explain how you can write a url pattern and view that
Can someone please explain this? Let me tell you what i know. If the
Can someone please please explain to me why the following code works when I
Can someone please explain to me the difference between the AppSettings and ApplicationSettings sections
Can someone please explain how to understand a logcat from an android force close.
Can someone please explain the major differences between Scala, Groovy and Clojure. I know
Can someone please explain why IE7 insists on putting a space between the table

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.