title: How to create double offset borders in CSS
body: <p>How do I create the double border in the attached image?    </p>
  
  <p>The issue I am having is the second border, I cannot get to sit behind the 1st border. I cannot do this with z-index as this then puts the whole second border behind the section background. I also need to consider that there will be a hover effect on the border.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.style-wrapper {
    display: flex;
    flex-wrap: wrap;
  }
  
  .style-wrapper article {
    flex: 1 0 26%;
    text-align: center;
  }
  
  .style-wrapper article .img-wrapper {
    border: 5px solid #aaaaaa;
    padding: 5px;
    background: white;
    position: relative;
  }
  
  .style-wrapper article .img-wrapper:before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border: 5px solid black;
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: white;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;section style="background:#e9e9e9"&gt;
    &lt;div class="style-wrapper"&gt;
      &lt;article&gt;
        &lt;a href=""&gt;
          &lt;figure&gt;
            &lt;div class="img-wrapper"&gt;
              &lt;img width="400" height="394" src="https://picsum.photos/200"&gt;
            &lt;/div&gt;
            &lt;figcaption&gt;
              &lt;h5&gt;Sculpture&lt;/h5&gt;
            &lt;/figcaption&gt;
          &lt;/figure&gt;
        &lt;/a&gt;
      &lt;/article&gt;
      &lt;article&gt;
        &lt;a href=""&gt;
          &lt;figure&gt;
            &lt;div class="img-wrapper"&gt;
              &lt;img width="400" height="394" src="https://picsum.photos/200"&gt;
            &lt;/div&gt;
            &lt;figcaption&gt;
              &lt;h5&gt;Sculpture&lt;/h5&gt;
            &lt;/figcaption&gt;
          &lt;/figure&gt;
        &lt;/a&gt;
      &lt;/article&gt;
    &lt;/div&gt;
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><code>.style-wrapper</code> is the container for all the articles. </p>
  
  <p>(The second border in this is black just for easy of developing this result)  </p>
  
  <p><a href="https://i.stack.imgur.com/1rKDT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1rKDT.jpg" alt="Desired Result"></a></p>