I have a question. I need to change the image size on hover without changing the parent div's size. Also, I have some
tags inside the same div with the image. When I add hover on image and give some pxs to width and height, the
tags move with the image.
img {
width: 200px;
height: 200px;
}
img:hover {
width: 250px;
height: 250px;
overflow: hidden;
}
<div class="product-items">
<div class="desc">
<img src="https://cdn.vox-cdn.com/thumbor/v97OD-MBgNjw8p5crApucVs9RB8=/0x0:2050x1367/1800x1800/filters:focal(1025x684:1026x685)/cdn.vox-cdn.com/uploads/chorus_asset/file/22022572/bfarsace_201106_4269_012.0.jpg" alt="">
<div class="cost">
<p class="your_product">Ваш товар</p>
<p>$89.00</p>
</div>
</div>
</div>