Does anyone know how I can achieve a zoom effect on my image like the example shown below?
I am open to using px
for sizing, but it seems to be causing more issues. Any assistance would be greatly appreciated.
This is the code I currently have:
.food-container {
display: flex;
border-radius: 10px;
background-color: orange;
height: 250px;
width: 750px;
border: 1px solid black;
}
h1 {
font-weight: 800;
font-size: 2.3rem;
margin-bottom: 30px;
}
.left-side {
width: 66%;
padding: 10px 20px;
}
.left-side>p {
font-size: 1.1rem;
}
.right-side {
width: 34%;
text-align: right;
}
.right-side>img {
width: 100%;
height: 250px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
<div class="food-container">
<div class="left-side">
<h1>Get your first meal for free!</h1>
<p>
Healthy, tasty and hassle-free meals are waiting for you. Start eating well today. You can cancel or pause anytime. And the first meal is on us!
</p>
</div>
<div class="right-side">
<img src="https://images.unsplash.com/photo-1653256513370-8d0d519b9477?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1622&q=80" alt="" />
</div>
</div>
The image appears distorted in this manner, but I'm not sure why. Thank you for any help in advance.