I am currently in the process of creating a website and I have encountered an issue. When I hover over an image, I want it to zoom in, but unfortunately it does not zoom within the designated div area. How can I fix this problem?
<div class="container">
<img src="image.jpg" alt="" height="400" width="500"/>
</div>
Here is my CSS styling:
.container{
height: 400px;
width: 500px;
border: 2px solid red;
}
.container:hover img{
height: 500px;
width: 600px;
}
You can view a demo on FIDDLE.