Design a Pricing Plans Layout Page (fixed height clashing with content overflow)

body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
}

h1{
    margin-bottom: 20px;
}

h2 {
  border-bottom:1px solid black;
  margin-bottom:5px;
}

.pricing-container {
  border:2px solid black;
  padding:  20px;
   gap: 20px;
  display:flex;
  align-content:center;
  flex-wrap:wrap;
  width:90%;
  max-width:800px;
  height:50vh;
  min-height:350px;
}

.pricing-card {
  background:rgb(205,205,205,) ;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  flex: 0 0 200px;
  border:2px solid black;
  padding:20px;
  box-sizing:content-box;
  text-align:center;
  transition: transform 0.3s ease;
}

.pricing-card:hover {
  transform:scale(1.05);
}

.features {
  list-style-type:none;
  text-align:left;
}

.features li {
  padding: 5px 0;
  font-size: 0.95rem;
}

.check {
  color: #219c54;
  font-weight: bold;
  margin-right: 8px;
}

.cross {
  color: crimson;
  font-weight: bold;
  margin-right: 8px;
}

.choose-plan {
  text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    background: #fecb3e;
    color: #000;
    font-weight: bold;
    border: 3px solid #efbe36;
    padding: 5px;
    transition: transform 0.3s ease;
}
.choose-plan:hover {
  cursor:pointer;
  transform: scale(1.05);
}

.basic-plan {
  order: 0;
}
.pro-plan {
  order: 1;
  flex-grow: 2;
  background: #f0f8ff;
}
.premium-plan {
  order: 2;
}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Pricing Plans Layout Page</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1>Pricing Plans</h1>
    <div class="pricing-container">
      <div class="pricing-card basic-plan">
        <h2>Basic</h2>
        <p>$9/month</p>
  <ul class="features">
    <li><span class="check">✓</span>Basic workout plans</li>
    <li><span class="check">✓</span>Exercise library access</li>
    <li><span class="cross">✗</span>Personal trainer chat</li>
    <li><span class="cross">✗</span>Nutrition tracking</li>
    <li><span class="cross">✗</span>Progress analytics</li>
  </ul>
  <button class="choose-plan" href="#">Choose Plan</button>
      </div>
      <div class="pricing-card pro-plan">
        <h2>Pro</h2>
        <p>$19/month</p>
   <ul class="features">
    <li><span class="check">✓</span>Basic workout plans</li>
    <li><span class="check">✓</span>Exercise library access</li>
    <li><span class="check">✓</span>Personal trainer chat</li>
    <li><span class="check">✓</span>Nutrition tracking</li>
    <li><span class="cross">✗</span>Progress analytics</li>
  </ul>
  <button class="choose-plan" href="#">Choose Plan</button>   
      </div>
      <div class="pricing-card premium-plan">
        <h2>Premium</h2>
        <p>$29/month</p>
   <ul class="features">
    <li><span class="check">✓</span>Basic workout plans</li>
    <li><span class="check">✓</span>Exercise library access</li>
    <li><span class="check">✓</span>Personal trainer chat</li>
    <li><span class="check">✓</span>Nutrition tracking</li>
    <li><span class="check">✓</span>Progress analytics</li>
  </ul>
  <button class="choose-plan" href="#">Choose Plan</button>
      </div>
    </div>
  </body>
</html>

wrote this code for lab. not quite satisfy with it .

looks good right? but when you resize browser vertically. it brokes like this …

code pass. btw. now I’m not sure if this should be left like this cuz I dont have a way to resize the example price plan… how do i fix this and do i need to now or it’ll be told in the latter curriculum how to deal with this or am i missing something?

I’ll be glad.thanks in advance for reading this.

here, you assign the height, and so your elements overflow when they do not fit anymore

thanks i also change added flex-grow:2;and it turned out like this …it’s always you there for everyone, MAN .thanks a lot!