UNIT 2 • STAGE 6 OF 7
Add box-shadow, borders, and finishing touches to your cards
Your cards now have styled headings, readable paragraph text, and your real content. In this stage, we're adding the final finishing touches that professional web designers use to make cards feel polished: shadows, borders, and spacing refinements.
Stage 6 is where good designs become great ones. These small additions - shadows, subtle color accents - are what separate a beginner project from something that looks professionally built.
box-shadow adds a soft shadow underneath an element, making it appear to "float" above the page. It's how you make cards look 3D and clickable.
box-shadow takes four values in a specific order:
0 (horizontal offset) - how far the shadow shifts left or right. Zero keeps it centered directly beneath the card.4px (vertical offset) - how far the shadow shifts downward. A positive number pushes the shadow below the card, making it look like light is coming from above - the most natural direction.12px (blur radius) - how soft or sharp the shadow edge is. A small number (like 2px) creates a tight, sharp shadow. A larger number (like 12px) creates a soft, diffused glow. Soft shadows feel more realistic and modern.rgba(0,0,0,0.12) (color + opacity) - rgba is like rgb but with a fourth value for transparency, from 0 (invisible) to 1 (fully opaque). 0.12 is very light - just a whisper of shadow - which looks elegant against a light page.A colored top border gives each card a bold accent line that ties back to your color palette. The border-top shorthand takes three values: thickness (4px - solid enough to be visible but not heavy), style (solid - a continuous line, as opposed to dashed or dotted), and color (your hex code). Because it only applies to the top edge, not all four sides, the card gets a subtle pop of color without feeling boxed in.
Try #ec65f8 for a pink top border, or pick any hex color. Some designers give each card a different accent color - try that by adding the rule directly to each <section> with an inline style.
Add a simple footer to the page - beneath the <main> element - so the page has a clean ending.
background-color: #50586C - the same dark blue-gray as your header. Using the same color at the top and bottom of the page "bookends" the design and makes it feel finished and intentional.color: #f9f7f8 - the same warm near-white as your h1. Light text on a dark background - your footer matches the header's text treatment for consistency.padding: 20px - same padding as the header, so both ends of the page have matching breathing room.font-size: 14px - slightly smaller than body text, which signals that this is a secondary line of information - a credit line, not main content.Before Stage 7, take a few minutes to review every color on your page and make sure it feels like you:
This is your last chance to experiment before the final stage:
0 8px 24px rgba(0,0,0,0.2)border-top color using inline stylesletter-spacing: 1px to the footer text for a refined lookopacity: 0.9 on the header rule - subtle but classyOne more stage to go! In Stage 7, you'll do a final review of everything you've built, learn a few CSS comments tricks, and celebrate completing Unit 2!