title: How to wrap text in inline-block element?
body: <p>Vertically centered the h4 element using inline-block, but unable to wrap  the text as the text goes out of parent div. Would like understand why it is  not auto wrapped. Tried word-wrap too but didn't work. I would like to have  the h4 element inside its parent.</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>.parent {
    height: 100px;
    width: 100px;
    border: 1px solid black;
    margin-left: 10px;
  }
  
  span {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
  }
  
  h4 {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
  }
  
  .parent::before {
    white-space: pre;
    content: "";
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="parent"&gt;
    &lt;span class="centerHelper"&gt;&lt;/span&gt;
    &lt;h4 class="centerElement"&gt;Overflowing text&lt;/h4&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>