TalentJR apps
Every element is a box. In the middle is the content, with the width you set. Around it is the padding (space inside the border), then the border (the line), then the margin (space outside that pushes other boxes away). With the usual box model, padding, border and margin are added on both sides, so the total width is width plus two paddings, two borders and two margins.
✓ You passed this lesson’s test.
Inside out, twice — “add padding, border and margin on both sides of the content”
Use it for: Working out why a box is wider than expected and fitting boxes side by side.
Check: 264 − 30 − 4 − 20 = 210 ✓
▶ Watch it animatedWork it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.
Right: 0 · Tried: 0
20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.
🏅 Sign in with Google to earn the 📦 Box Model Master badge when you pass — and a certificate when you finish all 10 lessons of Part 2 · CSS. You can still take the test without signing in.
Why does it work? When should you use it? Ask in English, मराठी or हिंदी.
Sign in with Google to ask Free — 20 questions a day.
Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.