CSS TRAINING · LESSON 4 OF 4 · 3 MIN READ
Combine a card’s styles
Use border-radius and review the whole rule.
Understand the idea
Border-radius rounds the corners of an element’s border box. It is independent of padding and background colour, so you can combine those properties in a single rule. Clear, minimal rules are easier to compare with a brief than a large collection of unrelated declarations.
Work through it
Write one .card selector, then add the three requested declarations. Read the property names and values one by one. Check braces, colons, semicolons and units. The DigiSkill activity deliberately supports a focused rule; passing it does not test every browser, accessibility requirement or responsive design concern.
SEE IT IN CONTEXT
Worked example
.card {
background-color: #f2f6fc;
padding: 20px;
border-radius: 12px;
}The three declarations have different jobs: background, inner spacing and rounded corners. The exercise uses its own exact values, so adapt the idea to the specification.
Common mistakes to avoid
- Using a border width in place of a corner radius.
- Forgetting one of the three requested declarations.
- Assuming a focused syntax check is a full visual test.
NOW HAVE A GO
Style a clean event card
Apply the idea in the linked activity. Follow its own brief and values; examples in this lesson are illustrative.
Try the practice activity →Download the practice starterAbout the linked activity
The linked CSS exercise checks exactly three declarations in one .card rule. These four lessons build toward that same activity. The checker does not apply your code to the website or implement all CSS behaviour.
Reading marks are self-reported and saved only in this browser.
0 of 4 lessons marked as read
Keep learning: Reference documentation ↗
