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

**URL:** <https://forum.freecodecamp.org/t/design-a-pricing-plans-layout-page-fixed-height-clashing-with-content-overflow/800678>\
**Category:** Curriculum Help\
**Tags:** html-css\
**Created:** [September 21, 2026, 8:40am UTC](https://forum.freecodecamp.org/t/design-a-pricing-plans-layout-page-fixed-height-clashing-with-content-overflow/800678 "2026-09-21T08:40:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![0121adilrashid](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/0121adilrashid/32/379393_2.png) [@0121adilrashid](https://forum.freecodecamp.org/u/0121adilrashid)\
**Post date:** [September 21, 2026, 8:40am UTC](https://forum.freecodecamp.org/t/design-a-pricing-plans-layout-page-fixed-height-clashing-with-content-overflow/800678/1 "2026-09-21T08:40:58Z")

</div>

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/responsive-web-design-v9/lab-pricing-plans-layout/design-a-pricing-plans-layout-page)**
>
> Learn to Code for Free

```css
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;
}

```

```auto
<!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 .

 ![price plan](https://global.discourse-cdn.com/freecodecamp/original/4X/4/9/9/499160ecdee5d1356adfdc704b1f6b3f66956d2c.png)looks good right? but when you resize browser vertically. it brokes like this …

 ![image](https://global.discourse-cdn.com/freecodecamp/original/4X/f/c/3/fc34685491c9e66f101b79939122557d03e59cf9.png) 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.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [September 21, 2026, 8:42am UTC](https://forum.freecodecamp.org/t/design-a-pricing-plans-layout-page-fixed-height-clashing-with-content-overflow/800678/2 "2026-09-21T08:42:25Z")

</div>

> [@0121adilrashid](#):
>
> ```auto
> height:50vh;
> min-height:350px;
> 
> ```

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

---

<div class="post-metadata">

**Author:** ![0121adilrashid](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/0121adilrashid/32/379393_2.png) [@0121adilrashid](https://forum.freecodecamp.org/u/0121adilrashid)\
**Post date:** [September 21, 2026, 9:39am UTC](https://forum.freecodecamp.org/t/design-a-pricing-plans-layout-page-fixed-height-clashing-with-content-overflow/800678/3 "2026-09-21T09:39:57Z")

</div>

![Capture](https://global.discourse-cdn.com/freecodecamp/original/4X/0/e/9/0e918cb5837c9e77490097c53e0b55baff48c23b.png) 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!

 ![price plan](https://global.discourse-cdn.com/freecodecamp/original/4X/4/9/6/496adc16a705538d2c767446704ac0fcb3ac0932.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 23, 2026, 9:40am UTC](https://forum.freecodecamp.org/t/design-a-pricing-plans-layout-page-fixed-height-clashing-with-content-overflow/800678/4 "2026-09-23T09:40:43Z")

</div>

Closed on September 23, 2026, 9:40am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
