title: Centered inline block sibling stretch to the remaining width
body: <p>I have 3 inline block elements;</p>
  
  <p>The middle one is centered. I would like to stretch the others to take the remaining width container.</p>
  
  <p>This is what I tried so far:</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>.container {
    width: 400px;
    height: 100px;
    text-align: center;
    background-color: yellow;
  }
  
  .line {
    border: dashed 1px #C7C9C7;
    display: inline-block;
    width: 38%;
  }
  
  .content {
    display: inline-block;
    background-color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;hr class="line" /&gt;
    &lt;div class="content"&gt;This is a text&lt;/div&gt;
    &lt;hr class="line" /&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I have the same result even if middle width will change?</p>