title: Vertical aligning text in overlay of image
body: <p>Having some trouble getting the desired effect on an image overlay with responsive image. What I want is upon hovering over the image, the colour block and text to appear as shown, but for the text to be in the vertical centre of the div. I have tried vertical-middle but it doesn't seem to be working. Can't make the width and height set value as need to collapse and expand. If anyone can help i'd appreciate it. Thanks </p>
  
  <p>Code, CSS below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.overlay-box {
     position: relative;
  }
  .overlay {
    display: none;
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background-color: rgba(38,150,198,0.5);
  }
  .overlay p {
     color: #ffffff;
     text-align: center;
  }
  .overlay-box:hover .overlay {
       display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row"&gt;
    &lt;div class="col-xs-12 col-sm-4 col-md-3" style="margin-bottom: 20px;"&gt;
  
        &lt;div class="overlay-box"&gt;
              &lt;a href="#" target="_blank"&gt;
                
                     &lt;div class="overlay"&gt;
                     
                            &lt;p&gt;1st line&lt;br&gt;2nd line&lt;br&gt;&lt;br&gt;
                            3rd line&lt;/p&gt;
                     &lt;/div&gt;
                  &lt;img src="http://placehold.it/2000x2000" class="img-responsive "/&gt;&lt;/a&gt;
  
  
        &lt;/div&gt;
  
    &lt;/div&gt;
  
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>