title: Floats inside absolute positioned div
body: <p>Is it possible to have multiple floats inside a absolute positioned div without specifying the width of the absolute container?</p>
  
  <p>See image:
  <img src="https://i.stack.imgur.com/5WVxB.png" alt="enter image description here"></p>
  
  <p><strong>Ninja edit:</strong>
  Your code with absolute and floats works perfectly, but just not in my case. I tried to simplify the problem, but obviously something else is wrong. I will come back to you as soon as i figure out why. Sorry.</p>
  
  <p><strong>Edit 2:</strong>
  Right, this is the reason for my problem.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="anotherContainer"&gt;
      Outercontainer
      &lt;div class="main"&gt;
          &lt;div class="left"&gt;Left&lt;/div&gt;
          &lt;div class="right"&gt;Right&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>#anotherContainer {
      position: relative;
      outline: 4px solid red;
      width: auto;
      height: auto;
      display: inline-block;
  }
  
  .main{
      border: 1px solid #f00;
      position: absolute;
  }
  
  .left{
      float: left;
      border: 1px solid #0f0;
      padding: 20px;
  }
  
  .right{
      float: right;
      border: 1px solid #00f;
      padding: 20px;
  }​
  </code></pre>
  
  <p><a href="http://jsfiddle.net/rP76V/" rel="nofollow noreferrer">JS fiddle</a></p>
  
  <p>My mistake, I assumed the container #anotherContainer would not have any effect on this.</p>