Loading Page Content...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Whether you are signing up for an online video streaming service or choosing a classroom tuition package at a premier coaching institute, you have seen a Pricing Table. A great pricing table is not just a lifeless list of numbers—it is an interactive, psychology-driven interface that clearly highlights the most popular tier, rewards user hover with satisfying micro-interactions, and adapts smoothly to any screen size.
In this capstone project for Intermediate CSS, we will combine Flexbox, CSS Variables, Transitions, Transforms, Pseudo-elements, and Box-Shadows to build an animated, commercial-quality Course Tuition Pricing Table.
A successful pricing table directs the student's eyes immediately to the best value option. Here is the architectural layout:
+-------------------------------------------------------------------------+
| PRICING TABLE ARCHITECTURE & INTERACTION |
+-------------------------------------------------------------------------+
[SECTION HEADER: Choose Your Learning Track]
[TOGGLE PILL: (o) Monthly | ( ) Annual (Save 20%)]
|
v
+--------------------+ +--------------------+ +--------------------+
| TIER 1: FOUNDATION | | TIER 2: PRO (HERO) | | TIER 3: MASTER |
| | | | | |
| | | [POPULAR BADGE] | | |
| Rs 1,499 / mo | | Rs 2,999 / mo | | Rs 4,999 / mo |
| | | | | |
| - Recorded Lectures| | - Recorded + LIVE | | - Everything in Pro|
| - Weekly Quizzes | | - 1-on-1 Mentorship| | - Personal Coach |
| - Standard Notes | | - All Test Series | | - Physical Books |
| | | | | |
| [Select Plan] | | [JOIN PRO TRACK] | | [Select Plan] |
+--------------------+ +--------------------+ +--------------------+
(Base Elevation) (Pre-scaled 1.05x, (Base Elevation)
Emerald Border,
Multi-layered Glow)
|
[HOVER EFFECT: Cards lift translateY(-8px)]transform: scale(1.05)) so it physically stands out even before the user hovers.position: absolute; top: -14px; left: 50%; transform: translateX(-50%);.transition: transform 0.3s ease, box-shadow 0.3s ease; with subtle lift (translateY(-8px)).::before).<input type="checkbox"> and the adjacent sibling selector (+ .toggle-slider).We define our primary indigo brand color, vibrant emerald for the recommended package, neutral card backgrounds, and easing speeds:
The container uses display: flex with align-items: center so the non-featured cards sit comfortably while the featured card can naturally expand taller:
The middle card is given a prominent gradient border, subtle default scaling, and high-contrast button:
When a student hovers over any card, it floats upward with an expanded ambient glow:
Save this complete HTML and CSS file as pricing.html and view it in your browser:
| Practice | Bad Approach | Good Approach | Why It Matters |
|---|---|---|---|
| Popular Card Stacking | Leaving all three cards identical in size and border | Pre-scaling the popular card (scale(1.04)) and adding a prominent badge | Guides student attention directly to the optimal offering. |
| Card Button Alignment | Letting buttons float at different heights when feature lists vary | Using display: flex; flex-direction: column; and flex-grow: 1 on .features-list | Pushes every CTA button cleanly to the bottom baseline. |
| Mobile Scaling | Keeping transform: scale(1.04) enabled on mobile viewports | Removing or resetting scaling inside @media (max-width: 1080px) | Prevents oversized cards from breaking screen boundaries on phones. |
| Feature Comparisons | Deleting unavailable features completely from lower tier cards | Listing disabled features with strikethrough styling and muted check icons | Shows prospective students what extra value higher tiers offer. |
transform: scale(1.04) and a distinctive border to create natural focal emphasis on the recommended plan.transform: translateY(-8px) combined with soft expanding box-shadow provides responsive tactile feedback.flex-grow: 1 on the feature checklist ensures all buttons align horizontally across every tier card.flex-direction: column and reset card scaling on small mobile devices.transform: scale(1.04) by default?transform: translateY(-8px);?transform: scale(1.04) on the featured card be reset or removed inside mobile media queries (max-width: 740px)?Add a pure CSS "Annual Billing (Save 20%)" discount toggle badge above the pricing table.
background: #10b981; color: white; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem;).| Previous Lesson | Next Lesson |
|---|---|
| Project 2: Blog Layout using CSS Grid | None |
Test your understanding of this lesson with 5 questions. Each question has one correct answer.