title: Image overlay on responsive sized images bootstrap
body: <p>I am trying to create a responsive grid of images (with descriptions) that when moused over will have a color overlay (just the image and not the text). Because of the responsive heights of the images, I am having an issue where the overlay covers everything and not just the image.</p>
  
  <p>Any way I can fix this?</p>
  
  <p>I've recreated the issue here for easier understanding: <a href="http://jsfiddle.net/r8rFc/">http://jsfiddle.net/r8rFc/</a></p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;div class="row"&gt;
  
      &lt;div class="col-xs-12 col-sm-6 col-md-3 project"&gt;
          &lt;a href="#"&gt;
              &lt;div&gt;
                  &lt;img src="http://placehold.it/500x500" class="img-responsive"/&gt;
                  &lt;div class="fa fa-plus project-overlay"&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div style="text-align:center;"&gt;
                  &lt;h3&gt;Project name&lt;/h3&gt;
                  &lt;p&gt;Image description&lt;/p&gt;
              &lt;/div&gt;
          &lt;/a&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>And my CSS:</p>
  
  <pre><code>.project-overlay {
      position: absolute;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(41,128,185,0.9);
      color: #fff;
      padding: 50%;
  }
  </code></pre>
  
  <p>Thanks in advance!</p>