title: How to contain a div floating outside of container div
body: <p>I'm making a 'topic' design, and I am having issues again. I have a floating div (to the left) inside a container div and it's going outside of it's boundries. It's dynamic, so setting a height: property will not suffice. Now I know it's the float: left; that's causing it, but how can I try fitting in it? I tried setting outer div to display: table; which works, but then it doesn't set the other div next to the floating one to fill the width.</p>
  
  <p><img src="https://i.stack.imgur.com/JldeB.png" alt="enter image description here"></p>
  
  <p>html:</p>
  
  <pre><code>    &lt;div class="reply-wrapper"&gt;
      &lt;div class="reply-box"&gt;
          &lt;div class="reply-header"&gt;
              &lt;span id="post-id"&gt;#1&lt;/span&gt;
              &lt;span id="post-date"&gt;Today, 12:08&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="reply-main"&gt;
              &lt;div class="user-info"&gt;
                  &lt;div class="username-wrap"&gt;
                      &lt;span id="username"&gt;Jakes625&lt;/span&gt;
                      &lt;!-- img online or not? --&gt;
                  &lt;/div&gt;
                  &lt;span id="usertitle"&gt;Admin&lt;/span&gt;
                  &lt;ul class="user-stats"&gt;
                      &lt;li&gt;Posts: 99&lt;/li&gt;
                      &lt;li&gt;Rep: 99&lt;/li&gt;
                      &lt;li&gt;Likes: 99&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
              &lt;div class="reply-data"&gt;
                  &lt;div class="reply-post"&gt;
                      &lt;h2&gt;Post Title&lt;/h2&gt;
                      &lt;p&gt;
                          So this is some text that goes in a post.
                      &lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div class="reply-signature"&gt;
                      This is an example signature.
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="reply-footer"&gt;
              &lt;span class="reply-button"&gt;Reply With Quote&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>    .reply-wrapper{
      background-color: #DDD;
      border-radius: 6px;
      padding: 6px;
      font: normal 12px arial, helvetica, sans-serif;
      color: #333;
  }
  .reply-box{
      border: 1px solid #c6c6c6;
      border-radius: 4px;
      margin-bottom: 30px;
  }
  .reply-box:last-child{
      margin-bottom: 0;
  }
  .reply-header{
      background-color: #474747;
      border-bottom: 1px solid #c6c6c6;
      border-radius: 4px 4px 0 0;
      padding: 4px;
      color: #FFF;
  }
  .reply-header #post-id{
      float: right;
  }
  .reply-main{
      background-color: #ebebeb;
  }
  .reply-main .user-info{
      width: 180px;
      float: left;
      background-color: #e5e5e5;
      border-right: 1px solid #c6c6c6;
      padding: 10px;
  }
  .reply-main .reply-data{
      margin-left: 200px;
      margin-right: 0px;
  }
  .user-info .username-wrap,.user-info #usertitle{
      text-align: center;
      display: block;
      text-align: center;
  }
  .username-wrap #username{
      font-size: 11pt;
  }
  .user-stats{
      margin: 0;
      padding: 0;
      list-style-type: none;
      margin: 10px 0 10px 0;
  }
  .user-stats li{
      background: #f2f2f2 none;
      color: #3e3e3e;
      border: 1px solid #c6c6c6;
      margin-bottom: 3px;
      padding: 4px;
      line-height: 20px;
  }
  .reply-post{
      padding: 10px;
  }
  .reply-post h2{
      margin: 0;
      padding: 0;
      border-bottom: 1px solid black;
  }
  .reply-signature{
      border-top: 1px solid #c6c6c6;
      padding: 10px;
  }
  .reply-footer{
      padding: 4px;
      height: 15px;
      background-color: #d8d8d8;
      border-top: 1px solid #c6c6c6;
  }
  .reply-footer .reply-button{
      float: right;
  }
  </code></pre>
  
  <p>PAGE SOURCE: <a href="http://jakes625.toomanylols.com/thread.html" rel="nofollow noreferrer">http://jakes625.toomanylols.com/thread.html</a></p>