title: Vertical align text inside dynamic height div
body: <p>I want to vertically align text inside a div which is dynamic height say 10% of page for example, but without using the well-known "table method". Can this be achieved with pure CSS?</p>
  
  <p><a href="https://i.stack.imgur.com/28eeX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/28eeX.png" alt="enter image description here"></a></p>
  
  <p>Piece of code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="post-details-wrapper"&gt;
      &lt;div class="post-details-h"&gt;
          Post Details
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>post-details-h {
  background-color: green;
  height:5%;
  width:100%;
  }
  </code></pre>
  
  <p>In this particular case the goal is to vertically align the text of "post-details-h" div.</p>