title: How to wrap a whole group of elements on the next line when screen gets smaller using CSS?
body: <p>On big screens, like desktops, it would look like this:
  <a href="https://i.stack.imgur.com/fHtZn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fHtZn.png" alt="enter image description here" /></a></p>
  <p>But in smaller screens or when zoomed in, I want my multiple lines to wrap like this:
  <a href="https://i.stack.imgur.com/gDoyq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gDoyq.png" alt="enter image description here" /></a></p>
  <p>I tried this:</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>.tab__set {
    display: block;
    font-size: 1.2em;
    font-family: monospace;
    overflow: hidden;
    border: 1px solid;
    resize: horizontal;
  }
  
  .tab {
    min-height: 1.2rem;
    display: block;
    white-space: wrap;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;span class="tab__set"&gt;
    &lt;span class="tab"&gt;e|------------------------|----------------------------|----------------------|-------------&lt;/span&gt;
    &lt;span class="tab"&gt;B|------------------------|-------2h3p2----5-----5--2--|------2-----2-----2---|---3-----3---&lt;/span&gt;
    &lt;span class="tab"&gt;G|------------------------|----2--------2--4-----4--2--|------2-----2-----2---|---2-----2---&lt;/span&gt;
    &lt;span class="tab"&gt;D|------------------------|----------------------------|----------------------|-------------&lt;/span&gt;
    &lt;span class="tab"&gt;A|------------------------|-0--------------------------|----------------------|-------------&lt;/span&gt;
    &lt;span class="tab"&gt;E|--------------------0h2-|----------------4--4-----2--|---2-----2--0--0-----0|---2--2-----2&lt;/span&gt;
  &lt;/span&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Above, I tried using <code>white-space: wrap;</code> but the result is not what I desire. It doesn't wrap as a whole set of tabs like what it did on the second image above. Instead, it just wraps as individual elements.</p>
  <p>Then I tried using <code>white-space: nowrap;</code> and of course that doesn't work because it will not show all the tabs unless I scroll horizontally. I don't know how to make multiple elements go on a new line as a whole group. Please help.</p>
  <hr />