title: Relative parent DIV to inherit the width of absolute child DIV
body: <p>I am trying to position a child DIV at the bottom of a parent DIV, but I would also like the contents of the child DIV to help dictate the dimensions of the parent DIV. As I have it right now, the child DIV doesn't affect the width/height of the parent DIV.</p>
  
  <p>Here is a sample of my HTML/CSS code:</p>
  
  <p>//HTML code:</p>
  
  <pre><code>&lt;div id="parent"&gt;
      &lt;h3&gt;Top Aligned Title&lt;/h3&gt;
      &lt;div id="child"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>//CSS code:</p>
  
  <pre><code>#parent {
      background-color:#222;
      position: relative;
      height: 500px;
  }
  #child {
      background-color:#444;
      position: absolute;
      bottom: 0px;
      width: 100px;
      height: 200px;
  }
  </code></pre>
  
  <p>What do I need to do it achieve what I am trying to do? I could forgo the absolute/relative CSS rules and simply create a table within the parent DIV which would allow me to achieve both bottom alignment and content that dictates the parent's dimensions. </p>
  
  <p>However, I'd like to know if there a way to do this in CSS and without having to set the width of the parent DIV.</p>
  
  <p>thanks in advance!</p>