title: Fill remaining horizontal width without a fixed width
body: <p>I'm trying to float two elements and make the second element fill the remaining width space using only CSS, but the more answers &amp; research I do looks like I might need to use JS. </p>
  
  <p>I'm trying to float text with a variable width next to <code>span</code> which I want to fill the remaining space. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>ul#filter-list {
    list-style: none;
    padding-left: 0px;
  }
  ul#filter-list span {
    font-size: 14px;
    float: l margin: 0px 5px;
  }
  span.filter-pill {
    border-radius: 4px;
    width: 100%;
    margin-left: 12px;
    height: 10px;
    display: inline-block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul id="filter-list"&gt;
    &lt;li&gt;
      &lt;a href="{{ route('question.index') }}"&gt;
        &lt;span&gt;All&lt;/span&gt;
        &lt;span style="background: #5fbeaa" class="filter-pill"&gt;&lt;/span&gt;
      &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href="{{ route('question.index') }}"&gt;
        &lt;span&gt;a big filter name here&lt;/span&gt;
        &lt;span style="background: #5fbeaa" class="filter-pill"&gt;&lt;/span&gt;
      &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>JSFiddle - <a href="https://jsfiddle.net/1466qdab/" rel="nofollow">https://jsfiddle.net/1466qdab/</a></p>
  
  <p>Note with the width set to 100% it falls to the line under. </p>