title: Overlay on hover is wider than image
body: <p>I've been trying to display an overlay on hover for my category cards I made with Bootstrap. The overlay works great however the only problem is that the overlay is wider than my image. I also need the overlay to match the radius but I'm not really sure how to fix this..</p>
  <p>I've provided my code below:</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>.home-categories {
    background-color: var(--bg-dark);
  }
  
  .home-category-image-container {
    padding: 0px;
    margin: 0px;
    position: relative;
    transition: .3s ease-in;
  }
  
  .home-category-image {
    border-radius: 15px;
  }
  
  .home-category-image-container:hover .category-overlay {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(4, 4, 4, 0.4);
  }
  
  .home-category-title {
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 1000;
    color: #f2f3f4;
    opacity: .85;
    font-family: "Russo One", sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 5px;
    bottom: 5px;
    right: 5px;
    position: absolute;
  }
  
  .home-category-title:hover {
    text-decoration: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"&gt;
      &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
          integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"&gt;
      &lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
          integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"&gt;
      &lt;/script&gt;
      &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
          integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"&gt;
      &lt;/script&gt;
     
  
  &lt;section class="home-categories"&gt;
    &lt;div class="container-fluid py-5"&gt;
      &lt;div class="row"&gt;
  
        &lt;div class="home-category-image-container col-lg-3 col-md-6 col-sm-6 col-xs-12 p-2"&gt;
          &lt;a href="#"&gt;
            &lt;div class="category-overlay"&gt;&lt;/div&gt;
            &lt;img src="https://images.pexels.com/photos/47356/freerider-skiing-ski-sports-47356.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=2&amp;h=650&amp;w=940" alt="{{category.title}}" class="home-category-image img-fluid"&gt;
            &lt;h3 class="home-category-title" data-aos="fade-in"&gt;title&lt;/h3&gt;
          &lt;/a&gt;
        &lt;/div&gt;
  
        &lt;div class="home-category-image-container col-lg-3 col-md-6 col-sm-6 col-xs-12 p-2"&gt;
          &lt;a href="#"&gt;
            &lt;div class="category-overlay"&gt;&lt;/div&gt;
            &lt;img src="https://images.pexels.com/photos/47356/freerider-skiing-ski-sports-47356.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=2&amp;h=650&amp;w=940" alt="{{category.title}}" class="home-category-image img-fluid"&gt;
            &lt;h3 class="home-category-title" data-aos="fade-in"&gt;title&lt;/h3&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        
  
        &lt;div class="home-category-image-container col-lg-3 col-md-6 col-sm-6 col-xs-12 p-2"&gt;
          &lt;a href="#"&gt;
            &lt;div class="category-overlay"&gt;&lt;/div&gt;
            &lt;img src="https://images.pexels.com/photos/47356/freerider-skiing-ski-sports-47356.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=2&amp;h=650&amp;w=940" alt="{{category.title}}" class="home-category-image img-fluid"&gt;
            &lt;h3 class="home-category-title" data-aos="fade-in"&gt;title&lt;/h3&gt;
          &lt;/a&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Thanks for any help</p>