on hover image border width bigger then same other column border width
<p>I want this like the image in responsive layout<a href="https://i.stack.imgur.com/bgjBK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bgjBK.jpg" alt="enter image description here"></a></p>

<p>I have tried but it is not working as when I increase the border of one element, the increased size affects the following images and the grid layout is not as per design any more.</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>.list_item{
  margin: 0px 0px;
  padding: 0px 0px;
  list-style: none;
}

.list_item li{
  margin-bottom: 10px;
  padding-left: 14px;
  padding-right: 14px;
}

.list_item li{
  float: left;
  margin-bottom: 20px;
  margin-top: 7px;
  padding-left: 20px;
  padding-right: 20px;
  width: 33.3333%;
}
.list_item &gt; li img {
height: 137px;
width: 259px;
}
.list_item li:hover .list_img{
  border: 5px solid red;
  height: 147px;
  width: 269px;
}

.list_item &gt; li .list_img{
  border: 3px solid red;
  height: 143px;
  width: 265px;
background:blue;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul class="list_item"&gt;
  &lt;li&gt;
    &lt;div class="list_img"&gt;
      &lt;img src="images/1.jpg"&gt;
    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li class="list_select"&gt;
    &lt;div class="list_img"&gt;
      &lt;img src="images/2.jpg"&gt;
    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;div class="list_img"&gt;
      &lt;img src="images/2.jpg"&gt;
    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;</code></pre>
</div>
</div>
</p>