QuizNot attempted
box-sizing
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- 250px vs 200px
content-box(the default) treatswidthas the content only, so padding and border are added on top: 200 + 2×20 + 2×5 = 250border-boxfits padding and border inside the 200.- Not 200px vs 250px: that swaps the two models.
- Not 200px vs 200px: only
border-boxkeeps the declared width. - Not 240px vs 200px: that counts the padding but forgets the 10px of border.
- This is why resets set
*, *::before, *::after { box-sizing: border-box }.