title: Why do <fieldset>s clear floats?
body: <p>Consider the following test case, in which a floated and an inline element are placed inside a <code>&lt;fieldset&gt;</code> versus a <code>&lt;div&gt;</code>:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.float {
    float: right;
    background-color: red;
    height: 200px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;With fielset&lt;/h1&gt;
  &lt;fieldset&gt;
    &lt;span&gt;Inline!&lt;/span&gt;
    &lt;div class="float"&gt;Float!&lt;/div&gt;
  &lt;/fieldset&gt;
  &lt;fieldset&gt;
    &lt;span&gt;Inline!&lt;/span&gt;
    &lt;div class="float"&gt;Float!&lt;/div&gt;
  &lt;/fieldset&gt;
  
  &lt;h1&gt;With div&lt;/h1&gt;
  &lt;div&gt;
    &lt;span&gt;Inline!&lt;/span&gt;
    &lt;div class="float"&gt;Float!&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;span&gt;Inline!&lt;/span&gt;
    &lt;div class="float"&gt;Float!&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>When rendered, <code>fieldset</code> containers are 200 pixels tall (they clear the floats?) while the <code>div</code> containers are only as tall as the inline elements. What is the cause of this behavior, and is there a workaround which allows the <code>fieldset</code> containers to behave as the <code>div</code> containers do?</p>