title: Dynamically increasing the size of a div tag in C#/Javascript based on its child control
body: <p>I have a div tag in which i have an autogrow textarea. When I press any key or type something within the textarea, its height increases one line at a time. But the problem here is that the size of the div tag is the same, so that looks too bad, like the textarea falling out from the div container...
  So I want the div tag to also expand simultaneously as the textarea increases.
  The code below represents the code for the textarea contained within a div tag</p>
  
  <pre><code>&lt;body bgcolor="#CCC" style="height: 460px"&gt;
  &lt;form id="form1" runat="server" method="post"&gt;
  &lt;div  id="expandable_div" style="background-color: #000000" &gt;
      &lt;textarea id="Text1"  rows = "8" runat="server" cols="30" onkeyup="AutoGrowTextArea(this)"   name="S1"&gt; &lt;/textarea&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>
  In the style sheet, I tried putting:</p>
  
  <pre><code> div#expandable_div
          {
              min-height:205px;
              height:auto;
          }
  </code></pre>