title: CSS dynamic height based on child elements
body: <p>cool so i have been exploring CSS with HTML fo about a month now and the one thing i am still struggling with is how to get a element to adjust its height based on the height on the children. so for example i have a news button that will take me to a page that has links to an archive of articles printed at different times, the articles vary in length, but the content element that holds it all, always allows the articles to overflow and then i have to use scroll, is there away to set the height to adjust to the children elemets inside.</p>
  
  <p>i have tried:</p>
  
  <pre><code>height: 100%;
  </code></pre>
  
  <p>if i inspect element the metrics say its at 647px. and then it stays there</p>
  
  <pre><code>height: auto;
  </code></pre>
  
  <p>sets the height at 200px, and everything is overflowed.</p>
  
  <p>this is a section of html nesting..</p>
  
  <pre><code> &lt;div id="news_head"&gt;
   &lt;/div&gt;
   &lt;div id="news_content"&gt;
     &lt;div id="news_scroll"&gt;
     &lt;/div&gt;
     &lt;div id="news_main_page"&gt;
     &lt;/div&gt;
     &lt;div id="side_archive"&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   &lt;div id="disquss_section"&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>the css for this is:</p>
  
  <pre><code>#news_head {
    border: 1px solid red;
    height: 200px;
    width: 100%;
  }
  
  #news_content {
    border: 1px solid red;
    height: 100%;
    width: 1200px;
    margin: 5px auto;
  }
  
  #news_scroll {
    border: 1px solid green;
    width: 1198px;
    height: 200px;
  }
  
  #news_main_page {
    border: 1px solid blue;
    width: 988px;
    height: 430px;
    float: left;
  }
  
  #side_archive {
    border: 1px solid yellow;
    width: 200px;
    height: 430px;
    float: right; 
  }
  </code></pre>
  
  <p>i am using the bordering just to see a visual as to what is going on. i have read some things but i am not exactly sure how to implement it here, <a href="http://css-tricks.com/snippets/css/center-div-with-dynamic-height/" rel="nofollow">http://css-tricks.com/snippets/css/center-div-with-dynamic-height/</a>.
  any help, i am using JavaScript and jQuery as well, so any suggestions are welcome.</p>