title: How to center an element horizontally and vertically
body: <p>I am trying to center my tabs content vertically, but when I add the CSS style <code>display:inline-flex</code>, the horizontal text-align disappears.</p>
  
  <p>How can I make both text alignments x and y for each of my tabs?</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>* { box-sizing: border-box; }
  #leftFrame {
    background-color: green;
    position: absolute;
    left: 0;
    right: 60%;
    top: 0;
    bottom: 0;
  }
  #leftFrame #tabs {
    background-color: red;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25%;
  }
  #leftFrame #tabs div {
    border: 2px solid black;
    position: static;
    float: left;
    width: 50%;
    height: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id=leftFrame&gt;
    &lt;div id=tabs&gt;
      &lt;div&gt;first&lt;/div&gt;
      &lt;div&gt;second&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>