Answer the question
In order to leave comments, you need to log in
How to enlarge div on hover while maintaining font size?
There is such html
<div class='general_block'>
<a class='link' href='#'>
<img class='img' scr='/img/pic1.jpg'><!--картинка товара-->
<span class='description_good'>
описание товара
</span>
<span class='cost'>
цена
</span>
</a>
</div>
<style type="text/css">
.general_block:hover{
position:relative;
transform: scale(1.5, 1.5);
margin-top: 35px;
margin-bottom: -20px;
}
</style>
.img:hover{
margin-top: 25px;
transform: scale(1.5, 1.5);
padding-bottom: 17px;
}
Answer the question
In order to leave comments, you need to log in
It's not entirely clear what you want to achieve. You don't like it when the bottom block moves, but you also don't like the overlap of the bottom block.
Describe how it should be in your opinion)
The img tag doesn't have a closing tag!
In general, it is better to explain to the person to whom you are making a website that it is better to open a whole page with this product by clicking on the picture. This is good for SEO. I don't know how it's called.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question