My goal is to make my image occupy half of the div's width and 100% of the height. However, I am facing an issue with a lingering white bar at the bottom. Can you offer some guidance on how to resolve this?
Take a look at the site preview
.container {
background-color: white;
height: 90%;
width: 60%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
border-radius: 8px;
}
img {
max-width: 100%;
border-radius: 8px;
}
\#description {
width: 50%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
<main>
<div class="container">
<div id="photo">
<img src="https://via.placeholder.com/300">
</div>
<div id="description">
<div id="header"> P E R F U M E</div>
<h2 id="name">Gabrielle Essence Eau De Parfum</h2>
<div id="description">A floral, solar and voluptuous interpretation composed by Olivier Polge, Perfumer-Creator for the House of CHANEL.</div>
<div id="price">
<div id="newprice">$149.99</div>
<div id="oldprice">$169.99</div>
<button id="add">Add to Cart</button>
</div>
</div>
</main>
I have experimented with the max-width and max-height properties, but unfortunately, I have not been able to find a solution. Any suggestions would be greatly appreciated.