Lesson 17 of 29 · CSS Basics
Boss: Style a Profile Card with CSS
The Dull Golem blocks the way. Every test you pass deals damage — pass them all to defeat it and claim a loot chest.
Deep in the quarry below the Painted Cliffs stands the Dull Golem: a hulk of grey stone that drains the colour out of everything it touches. Its latest victim is Ember the dragon's profile card — plain black text on plain white. Paint it back to life, and the golem crumbles.
Battle plan
You already know almost everything this fight needs: selectors, colours, units, fonts and the box model. One new property finishes the look. border-radius rounds the corners of a box:
.badge {
border-radius: 8px; /* gently rounded corners */
}
.pill {
border-radius: 999px; /* more than half the height: a pill shape */
}
It works with or without a border, and it rounds the background too.
Assignment
The HTML is ready — write the CSS in the <style> element:
- Every element:
box-sizing: border-box. body: the background colour#2b2622and the font stackArial, Helvetica, sans-serif..card: the background colour#fdf6e3,width: 340px,margin: 48px auto,padding: 32px, a3px solid #e8a33dborder,border-radius: 16pxand centred text..name: the text colour#b5432cand the font stackGeorgia, serif..button: the background colour#e8a33d, the text colour#2b2622,padding: 10px 24px,border-radius: 999px, bold text and no underline.
Each passing test knocks a chunk of stone off the golem. Make all ten pass to bring the colour back.
Premium lesson
Unlock the full Learn HTML & CSS course
- All 29 lessons, bosses and quizzes — lifetime access
- One payment of $35, no subscription
- Finish within 30 days and claim $10.50 (30%) back
Want more than one course?
The All-Access Pass unlocks all 8 courses and every new one we release, for $120 once.
Keep learning
Need a quick reminder? The HTML & CSS cheat sheet has every topic of Learn HTML & CSS on one page.
Lesson last updated on .