CSS image overlay not working
<p>I am trying to get a transparent black overlay to appear when hovering over images on this page:</p>

<p>I am not sure where I am going wrong though, as this does nothing.  I would like the overlay to have a bit of padding from the sides of the image, which would also continue when the site is resized.</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>.photo-gallery div {
  display: inline-block;
  margin: 1%;
  width: 31%;
  position: relative;
}
.photo-gallery div a {
  line-height: 0;
  display: block;
}
.overlay {
  position: absolute;
  z-index: 200;
  width: 90%;
  height: 90%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background-color: rgba(0, 0, 0, 0.7);
}
.photo-gallery div a:hover .overlay {
  display: block;
}</code></pre>
</div>
</div>
</p>