Lesson 6 of 50
cssBox‑Sizing Property
5 mins
Course progress12%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 6 of 50
css5 mins
Keep these ideas in mind as you work through the lesson.
box-sizing changes how width/height are calculated.
content-box (default) – width/height = content only.border-box – width/height include padding + border.Most modern projects set * { box-sizing:border-box; } as a global reset.
*, *::before, *::after { box-sizing:border-box; }