I need to scale the middle div using transform scale(1.3). It works of course but the problem is that after scaling it overlaps neighbor divs. Is it possible to get rid of overlap using just CSS? This is how it is now looks like:
But I want it this way
.main {
width: 100%;
height: 500px;
background-color: gray;
padding: 100px;
}
.box {
width: 100px;
height: 100px;
background-color: red;
margin: 2px;
display: inline-block;
border: 2px;
border-style: solid;
border-color: black;
}
.scaled-box {
width: 100px;
height: 100px;
-webkit-transform: scale(1.3);
-moz-transform: scale(1.3);
transform: scale(1.3);
display: inline-block;
background-color: green;
opacity: 0.7;
}
<div class="main">
<div class="box"></div>
<div class="scaled-box"></div>
<div class="box"></div>
</div>