Hi guys,
I am trying to create a pricing table using only HTML and CSS. I have created the basic layout, but now I do not know how to align the text, buttons and containers, so they look equal to each other even if some of them have more text. Below you can see the current layout and style.
Photo:
Here is the code:
<style>
.pricing-plan {
width: 300px;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
overflow: hidden;
font-family: Futura-light;
font-size: 16px;
line-height: 1.5;
color: black;
margin: 15px;
}
.pricing-plan__highlighted {
box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
transform: scale(10);
}
.pricing-plan__special-text {
padding: 10px;
text-align: center;
font-weight: bold;
color: white;
background: #125e68;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2) inset;
}
.pricing-plan__header {
padding: 25px;
background: #65e6f7;
color: black;
}
.pricing-plan__title,
.pricing-plan__summary{
margin: 0;
text-align: center;
}
.pricing-plan__title {
font-size: 1.5em;
font-weight: 400;
}
.pricing-plan__summary {
font-size: 1em;
font-weight: 300;
}
.pricing-plan__description {
padding: 25px;
}
.pricing-plan__list {
padding: 0;
margin: 0;
}
.pricing-plan__feature {
list-style: none;
margin: 0;
padding-left: 25px;
position: relative;
font-size: 0.9em;
}
.pricing-plan__feature:not(:last-child) {
margin-bottom: 05.em;
}
.pricing-plan__feature::before {
content: "\2714";
color: #65e6f7;
left: 0;
position: absolute;
}
.pricing-plan__actions {
padding: 25px;
border-top: 1px solid #eee;
display: flex;
flex-direction: column;
}
.pricing-plan__button {
display: inline-block;
margin: 15px auto;
padding: 8px 20px;
text-decoration: none;
color: #253c57;
background: white;
border-radius: 5px;
border: 1px solid #465f7c;
text-transform: uppercase;
letter-spacing: 0.02em;
font-weight: bold;
text-align: center;
}
.pricing-plan__button:hover {
background: #65e6f7;
color: white;
}
.pricing-plan__cost {
margin: 0;
text-align: center;
font-size: 2em;
color: black;
}
.pricing-plan__text {
font-size: 0.9em;
text-align: center;
margin: 0 0 10px 0;
}
.pricing-plan__container {
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
flex-wrap: wrap;
}
</style>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="pricing-table.css">
</head>
<body>
<div class="pricing-plan__container">
<section class="pricing-plan">
<div class="pricing-plan__header">
<h1 class="pricing-plan__title">Training Coaching</h1>
<h2 class="pricing-plan__summary">For those getting started</h2>
</div>
<div class="pricing-plan__description">
<ul class="pricing-plan__list">
<li class="pricing-plan__feature">Fully tailored training programme adapted to your goals</li>
<li class="pricing-plan__feature">Technical review of the exercises</li>
<li class="pricing-plan__feature">Bodyweight/gym equipment</li>
<li class="pricing-plan__feature">Home/gym based</li>
<li class="pricing-plan__feature">Video Demonstration</li>
<li class="pricing-plan__feature">Weekly check-ins</li>
<li class="pricing-plan__feature">24/7 WhatsApp contact</li>
</ul>
</div>
<div class="pricing-plan__actions">
<p class="pricing-plan__cost">£ 60</p>
<p class="pricing-plan__text">per month</p>
<a href="./" class="pricing-plan__button">BOOK A FREE CONSULTATION</a>
<p class="pricing-plan__text">Minimum spend $816 over 12 months</p>
</div>
</section>
<section class="pricing-plan priicng-plan__highlighted">
<div class="pricing-plan__special-text">Recommended </div>
<div class="pricing-plan__header">
<h1 class="pricing-plan__title">Vip Online Coaching</h1>
<h2 class="pricing-plan__summary">For those getting started</h2>
</div>
<div class="pricing-plan__description">
<ul class="pricing-plan__list">
<li class="pricing-plan__feature">Fully tailored macronutrient/nutritional guide</li>
<li class="pricing-plan__feature">Fully tailored training programme</li>
<li class="pricing-plan__feature">Exercise technique analysis</li>
<li class="pricing-plan__feature">Supplement guidance</li>
<li class="pricing-plan__feature">24/7 WhatsApp contact</li>
<li class="pricing-plan__feature">Weekly check-ins</li>
</ul>
</div>
<div class="pricing-plan__actions">
<p class="pricing-plan__cost">£ 120</p>
<p class="pricing-plan__text">per month</p>
<a href="./" class="pricing-plan__button">BOOK A FREE CONSULTATION</a>
<p class="pricing-plan__text">Minimum spend $816 over 12 months</p>
</div>
</section>
<section class="pricing-plan">
<div class="pricing-plan__header">
<h1 class="pricing-plan__title">Nutrition Coaching</h1>
<h2 class="pricing-plan__summary">For those getting started</h2>
</div>
<div class="pricing-plan__description">
<ul class="pricing-plan__list">
<li class="pricing-plan__feature">Adapted to your goals, personal preferences and allergies</li>
<li class="pricing-plan__feature">Fully tailored nutritional plan</li>
<li class="pricing-plan__feature">Shopping guidance</li>
<li class="pricing-plan__feature">24/7 WhatsApp contact</li>
<li class="pricing-plan__feature">Weekly check-ins</li>
</ul>
</div>
<div class="pricing-plan__actions">
<p class="pricing-plan__cost">£ 60</p>
<p class="pricing-plan__text">per month</p>
<a href="./" class="pricing-plan__button">BOOK A FREE CONSULTATION</a>
<p class="pricing-plan__text">Minimum spend $816 over 12 months</p>
</div>
</section>
<section class="pricing-plan">
<div class="pricing-plan__header">
<h1 class="pricing-plan__title">3 Months Online Coaching</h1>
<h2 class="pricing-plan__summary">For those getting started</h2>
</div>
<div class="pricing-plan__description">
<ul class="pricing-plan__list">
<li class="pricing-plan__feature">Fully tailored macronutrient/nutritional guidance</li>
<li class="pricing-plan__feature">Fully tailored training programme</li>
<li class="pricing-plan__feature">Supplement guidance</li>
<li class="pricing-plan__feature">24/7 WhatsApp contact</li>
<li class="pricing-plan__feature">Weekly check-ins</li>
</ul>
</div>
<div class="pricing-plan__actions">
<p class="pricing-plan__cost">£ 300</p>
<p class="pricing-plan__text">per 3 months</p>
<a href="./" class="pricing-plan__button">BOOK A FREE CONSULTATION</a>
<p class="pricing-plan__text">Minimum spend $816 over 12 months</p>
</div>
</section>
<section class="pricing-plan">
<div class="pricing-plan__header">
<h1 class="pricing-plan__title">Video Consultation</h1>
<h2 class="pricing-plan__summary">For those getting started</h2>
</div>
<div class="pricing-plan__description">
<ul class="pricing-plan__list">
<li class="pricing-plan__feature">Overcoming healthy lifestyle barriers</li>
<li class="pricing-plan__feature">Psychonutritional barriers</li>
<li class="pricing-plan__feature">Training questions</li>
</ul>
</div>
<div class="pricing-plan__actions">
<p class="pricing-plan__cost">£ 40</p>
<p class="pricing-plan__text">per month</p>
<a href="./" class="pricing-plan__button">BOOK A FREE CONSULTATION</a>
<p class="pricing-plan__text">Minimum spend $816 over 12 months</p>
</div>
</section>
</div>
</body>
</html>