Home › Forums › Other › Some issues about relation between width/height and margin/padding/border › Reply To: Some issues about relation between width/height and margin/padding/border
Let me throw in another one. Something I hadn’t noticed before but what seems to me a serious flaw with box-sizing. Padding and border aren’t included in the actual dimension when it is transferred to a child element. Here you can see that the parent has dimensions as specified, even with padding and border applied. But if you set the child to 100% width and height, the properties are suddenly subtracted!
Seems to me it’s expected behavior. For #one, after taking out border and padding, what’s left is for content per se. Suppose you replace the div #two with some text, the text should be enclosed in a box of 180 x 30. So what’s available for #two should have the same dimension.