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

#193327
spz1st
Participant

The issue here is the margin a part of the element or not? If yes, then why the width and height set for the element don’t include it? If no, then why it takes the spot set for the element? Of course you may answer yes or no. Then you just prove my point that it’s inconsistent with respect to the treatment of margin.

Any way, no matter how do you view it, my point is that in practice, it would make layout setting much much simpler and easier if width and height included margin, border and padding. Currently it not only make it hard to do layouts (for example, if you adjust margins/border/padding, you also have to adjust width/height to preserve the original layout), but also make many desirable layouts impossible to achieve (unless you use javascript).