I think there are some errors in some of the questions for the practice sessions for the css box model – see screenshot (note: I had to stitch them into one image since I am only allowed to upload 1 image).
- First possible Error
I am asked to create a box that will render with 200px width. The width itself of the box is fixed and I can only choose border-box or content-box for the box-sizing. Now I would say in that case you need to choose content-box because only than the padding (20px all sides = 40px) and border (10px all sides = 20px) will enlarge the box so that it becomes 200px. But my answer is marked wrong ?! Border-box will not get me to a 200px width box though. It will stay at 140px.
- Second possible error
Here the first answer is registered as being correct. But aren’t all answers wrong? It should read “The total height and width of the box will be increased by 30px (NOT 15px!) for declaring a 15px padding”. Padding gets applied to all sides, so the box size increases by double the padding size.