Struggling to create a responsive card with an image at the top 50% and text/content area at the bottom 50%. No matter what CSS properties I try, nothing seems to solve the issue.
.container{
border: 1px solid black;
border-radius: 10px;
font-family: sans-serif;
position: relative;
}
.container .image{
object-fit: cover;
height: 50%;
}
img{
height: auto;
max-width: 100%;
border-radius: 10px 10px 0 0;
}
.container .content{
padding: 0.5rem 1rem;
height: auto;
width: auto;
}
h3{color: #494949;}
p{color: #8F8F8F}
<div class='container'>
<div class='image'>
<img src="https://media.istockphoto.com/photos/beautiful-nature-norway-aerial-photography-picture-id840781672?s=612x612" alt="" />
</div>
<div class="content">
<h3>Lorem, ipsum dolor</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim, quidem?</p>
</div>
</div>
Managed to place the text/content area above successfully, but struggling with moving the image without compromising its fit within the container.