Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

#193488
Senff
Participant

But if you set the child to 100% width and height, the properties are suddenly subtracted!

Not really weird, that’s by design. Child elements do not inherit a parent’s box-sizing property, so that’s expected behavior. The parent element has a width of 300px, but due to the padding and the border, the available space inside is 180px, so that’s what the child gets.