I have a div that when i hover another div inside it, i added a border effect on hover to the inner div and the parent div also expand to the width of the border added to the child div how can i stop this. here we can see the behavior in this fiddle
.payment-box {
padding: 5px;
text-align: center;
border: 1px solid blue;
width: 150px;
}
.payment-logo {
height: 100px;
}
.payment-link {
color: #fff;
padding: 12px;
background: #E2231A;
margin: 20px auto 5px auto;
display: inline-block;
font-weight: 550;
}
.payment-link:hover {
color: #E2231A;
border: 1px solid #E2231A;
background: #fff;
}
<div class="col-md-4">
<a href="">
<div class="payment-box">
<div class="payment-logo">
<img src="logo.jpg" width="100%" height="100%" alt="logo" />
</div>
<div class="payment-link">
click here
</div>
</div>
</a>
</div>