title: CSS Float does not stretch Div Height
body: <p>I have had this problem for a long time when working with HTML/CSS and Floats.</p>
  
  <p>In the image you can see I have a Box Div that is Floated left as there is many of these Boxes.  Inside the Box I have a <code>&lt;UL&gt;</code> List.  The List items <code>&lt;li&gt;</code> are also Floated left.</p>
  
  <p>As you can see in the image, the List items do not make the Box Div that they are inside of Expand.  I have tried several thing without much luck and was hoping someone with more experience could help?  I cannot set a fixed height on the Box Div as the number of icons is always different and it needs to expand to fix them.</p>
  
  <p><img src="https://i.stack.imgur.com/LyIin.png" alt="enter image description here"></p>
  
  <p>Live demo:  <a href="http://jsfiddle.net/jasondavis/u5HXu/" rel="nofollow noreferrer">http://jsfiddle.net/jasondavis/u5HXu/</a></p>
  
  <pre><code>&lt;div class="module-box"&gt;
      &lt;div class="module-box-title"&gt;
          &lt;h4&gt;&lt;i class="icon-cogs"&gt;&lt;/i&gt;Admin Settings&lt;/h4&gt;
          &lt;div class="tools"&gt;
              &lt;a href="#" class="collapse"&gt;-&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="module-box-body" style="display: block;"&gt;
  
  
          &lt;ul&gt;
              &lt;li&gt;
                  &lt;a href="#"&gt;
                      &lt;img src="http://cp.codedevelopr.com/modules/password_assistant/assets/icon.png" border="0"&gt;
                      &lt;span class="module-icon password_assistant"&gt;&lt;/span&gt;
                  &lt;/a&gt;&lt;br&gt;
                  &lt;a href="#"&gt;Change&lt;br&gt;Password&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="#"&gt;
                      &lt;img src="http://cp.codedevelopr.com/modules/password_assistant/assets/icon.png" border="0"&gt;
                      &lt;span class="module-icon password_assistant"&gt;&lt;/span&gt;
                  &lt;/a&gt;&lt;br&gt;
                  &lt;a href="#"&gt;Change&lt;br&gt;Password&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="#"&gt;
                      &lt;img src="http://cp.codedevelopr.com/modules/password_assistant/assets/icon.png" border="0"&gt;
                      &lt;span class="module-icon password_assistant"&gt;&lt;/span&gt;
                  &lt;/a&gt;&lt;br&gt;
                  &lt;a href="#"&gt;Change&lt;br&gt;Password&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
  
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>/* Modules homepage */
  .module-box {
      margin: 0px 0px 25px 25px;
      padding: 0px;
      float: left;
      width: 464px;
  }
  
  .module-box-title {
      margin-bottom: 0px;
      padding: 8px 10px 2px 10px;
      border-bottom: 1px solid #eee;
      color: #fff !important;
      background-color: #333;
      height: 51px;
      line-height: 45px;
      border-radius: 3px 3px 0 0;
  }
  
  .module-box-title h4 {
      display: inline-block;
      font-size: 18px;
      font-weight: 400;
      margin: 0;
      padding: 0;
      margin-bottom: 7px;
  }
  
  .module-box-title .tools {
      display: inline-block;
      padding: 0;
      margin: 0;
      margin-top: 6px;
      float: right;
  }
  .module-box-title .tools a {
      font-size: 31px;
      color: #fff;
      text-decoration: none;
      line-height: 29px;
  }
  
  .module-box-body {
      background-color: #fff;
      border: 1px solid #ccc;
      border-top: 0;
      padding: 10px;
      clear: both;
  }
  
  .module-box-body a {
      font-family: 'Source Sans Pro', sans-serif;
      font-size: 11px;
      color: #888;
      text-decoration: none;
  }
  
  .module-box-body li {
      float: left;
      margin: 0 12px 0 0;
      list-style: none;
  }
  </code></pre>