when the screen is max all is good but when i minimize it, the content doesn't center. when i use margin: auto; in "main-div" everything goes to the top left corner so i added "wrapper-div" to contain the main div and align that but it doesn't seem to be doing anything.
also there is something at the top which i can't seem to figure out what.enter image description here
body {
background-color: hsl(30, 38%, 92%);
}
table {
border-radius: 20px;
overflow: hidden;
border-collapse: collapse;
}
.wrapper-div {
width: auto;
margin: auto;
}
.main-div {
width: fit-content;
margin: 135px 470px;
position: absolute;
}
<body>
<div class="wrapper-div">
<div class="main-div">
<table cellpadding="0">
<tr class="parent-row">
<td class="img-container">
<img src="images/image-product-desktop.jpg" alt="image-product-desktop-version" />
</td>
<td class="text-container">
<h3 class="title1">PERFUME</h3>
<h2 class="title2"><b>Gabrielle Essence Eau De Parfum</b></h2>
<p class="description-text">
A floral, solar and voluptuous interpretation composed by Olivier Polge, Perfumer-Creator for the House of CHANEL.
</p>
<div class="both-prices">
<h2 class="new-price">$149.99</h2>
<h4 class="old-price">$169.99</h4>
</div>
<a class="cart-btn" href="#"><span></span>Add to cart</a>
</td>
</tr>
</table>
</div>
</div>
</body>