title: How to center text top/bottom when height 100% & display inline-block?
body: <p>I have responsive panels. I've tried a ton of things to get the text to be vertically centered, but I can't get it to work with what I have using <code>twitter-bootstrap</code>.</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>    *,
  
      *:before,
  
      *:after {
  
        box-sizing: border-box;
  
      }
  
      body {
  
        margin: 0
  
      }
  
      .testing-here {
  
        font-size: 0;
  
      }
  
      .panel-default {
  
        box-sizing: border-box;
  
        position: relative;
  
        width: 50%;
  
        padding-bottom: 40%;
  
        overflow: hidden;
  
        background-color: #446CB3;
  
        display: inline-block;
  
      }
  
      .panel-body {
  
        color: white;
  
        width: 100%;
  
        height: 100%;
  
        text-align: center;
  
        position: absolute;
  
        font-size: 16px;
  
        display: table-cell;
  
        vertical-align: middle;
  
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="testing-here"&gt;
    &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-body"&gt;
        Basic panel example show me full page &amp; resize window
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-body"&gt;
        Basic panel example font-size kept in between 16 and 50px max
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-body"&gt;
        Basic panel example
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-body"&gt;
        Basic panel example
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Questions I looked into:</strong></p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/21241800/vertically-center-div-when-body-height-100-without-absolute-pos">vertically center div when body height: 100% without absolute pos</a></li>
  <li><a href="https://stackoverflow.com/questions/79461/vertical-alignment-of-elements-in-a-div?rq=1">Vertical alignment of elements in a div</a></li>
  <li><a href="https://stackoverflow.com/questions/2939914/vertically-align-text-in-a-div?rq=1">Vertically align text in a div</a></li>
  </ul>