CSS · Exercise 1 of 5Next
Beginner
Pad, frame and space a card
Style the .card so it has 16px of padding on every side, a 2px solid border (any colour) on every side, and 24px of margin below it.
Then set its width so that the card is exactly 300px wide on screen (its offsetWidth). Don't use box-sizing: do the maths.
What Check tests
- The card has 16px of padding on all four sides
- The card has a 2px solid border on all four sides
- There is 24px of margin below the card
- The card is exactly 300px wide on screen
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.