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
January 17, 2015 at 8:35 am
#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.