I’m currently making a product landing page for a course project in freeCodeCamp.org
I’m on this part of the code where the div
element overlaps the h2
bottom border, and I don’t know how to fix the code properly.
here’s the screenshot of the overlapping issue:image
here’s the snippets of the code:
<section id="Pricing">
<h2>Pricing</h2>
<div class="product-container">
<h3 class="product-name">Arabica</h3>
<p class="product-price">$100</p>
<p>Lorem ipsum dolor sit amet.</p>
<button class="button select">Select</button>
</div>
<div class="product-container">
<h3 class="product-name">Robusta</h3>
<p class="product-price">$150</p>
<p>Lorem ipsum dolor sit amet.</p>
<button class="button select">Select</button>
</div>
<div class="product-container">
<h3 class="product-name">Liberica</h3>
<p class="product-price">$150</p>
<p>Lorem ipsum dolor sit amet.</p>
<button class="button select">Select</button>
</div>
<div class="product-container">
<h3 class="product-name">Excelsa</h3>
<p class="product-price">$200</p>
<p>Lorem ipsum dolor sit amet.</p>
<button class="button select">Select</button>
</div>
<div class="product-container">
<h3 class="product-name">Peaberry</h3>
<p class="product-price">$250</p>
<p>Lorem ipsum dolor sit amet.</p>
<button class="button select">Select</button>
</div>
</section>
section h2 {
font-size: 3rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid brown;
}
#pricing {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1.6rem;
}
#pricing .product-container {
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
width: 20%;
height: 15rem;
border: 2px solid #311c10;
border-radius: 7px;
padding: 1rem;
margin-top: 1rem;
}
#pricing .product-name {
font-size: 2.5rem;
font-family: Poppins, sans-serif;
background-color: #f0f0f080;
border-bottom: 0.5px solid #311c10;
}
#pricing .product-price {
font-size: 2rem;
font-weight: 500;
padding-top: 1rem;
}
#pricing p {
font-size: 1.6rem;
}
#pricing .button {
margin-top: 0.5rem;
}
I hope someone would help me fix this.
Thank youu!
I expect to fix the overlapping issue.