title: HTML ellipsis without specifying the particular width
body: <p>I'm trying to achieve the following layout (please see the screenshot below).</p>
  
  <ul>
  <li>If both SPAN and B fit the box - they just go one after another.</li>
  <li>If they don't - SPAN has an ellipsis but B is displayed completely (it is never bigger than a whole block).</li>
  </ul>
  
  <p>B can be included into the SPAN - but it didn't help me. I was also trying to use tables, even nested ones - nothing helps..</p>
  
  <p><strong>Expected behavior:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/cIuV6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cIuV6.png" alt="enter image description here"></a></p>
  
  <p><strong>Initial snippet:</strong></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>div {
    width: 200px;
    white-space: nowrap;
    border: 1px solid red;
    margin-top: 10px;
  }
  
  span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  b {
    padding-left: 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
    &lt;span&gt;test&lt;/span&gt;
    &lt;b&gt;12345&lt;/b&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
    &lt;span&gt;test test test test test test test test test test test&lt;/span&gt;
    &lt;b&gt;50&lt;/b&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>