Percentage Scrolling In Browser

Posted on 2006-05-23
Last Modified: 2010-04-17
Hello All,

I have the following html code in my page. Now this works great for 100% height on my page.

<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

html,body {
      margin: 0;
      padding: 0;

div {
      border: 10px solid #000000;
      -moz-box-sizing: border-box;
      box-sizing: border-box;

div#test {
      height: 100%;

div#nested {
      height: 50%;

div#nested2 {
      height: 50%; sc




<div id="test">
      <div id="nested">
                 Nested div with height: 50%
  <div id="nested2">
      Main div with height: 50%

Now the problem I need to solve is that i need to be able to store unlimited data in the second div (nested2) but i don't want this to stretch outside of the browser window. Instead I want the second div (nested2) to scroll within it's 50% boundaries.

Sorry if that makes no sense. The long term goal is to create a popup with concrete data on the first div and a dataset on the second div that will contain dynamic data that will forever change.

Please Help.

Question by:goldsmithwilliams
    1 Comment
    LVL 3

    Accepted Solution

    div#nested2 {
         height: 50%;

    This should make that second div scroll within the boundary.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now