'Change size on hover of one flex element with overlapping another
Solution 1:[1]
<div class="flex justify-content-evenly align-items-start flex-wrap">
<div class="relative container w-full w-3 h-22rem">
<div class="item-container grid inline absolute top-0 left-0">
<div class="text-center col">
<img class="w-full" src="assets/images/buket2.png" alt="buket">
</div>
<div class="col">
<h5 class="m-0">Bouquet 117 (21 gerberas)</h5>
<p class="text-400 text-sm font-medium mt-1">Fresh flowers</p>
<p class="font-bold">€83.49 EUR</p>
</div>
<button label="Add to cart" icon="pi pi-shopping-cart">
</button >
</div>
</div>
.item-container {
border: 1px solid #E7E7E7;
box-sizing: border-box;
border-radius: 10px;
margin: 15px 0 15px 0;
padding: 20px 20px 0 20px;
background-color: white;
&:hover {
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
z-index: 2;
.buy-btn {
display: block !important;
}
}
}
Solution 2:[2]
You can use CSS transform property like this
selector {
... /* others styles */
transition: 0.4s;
}
selector:hover {
transform: scaleY(1.2)
}
refer https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | NiNjA_CaT |
| Solution 2 | Guna P |

