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


Now if your suggestion were to add a new layer to the box model – for example ‘sphere’ which would be similar to padding but outside the border that could be interesting. One wouldn’t need a parent then in some cases. Too much to lose to reduce margin to this though…

I had proposed to add a new property for box-sizing, say all-box, to have margin get the same treatment as border/padding with border-box (see my earlier posts). All-box should also include border-box. As I said before, I’m certainly not seeking to redefine everything (width/height, margin, border, and padding) now. It’s certainly unthinkable to redefine them now. But I hope to get a remedy to it. Here I’m trying to show that it’d be much simpler and easier to achieve many layouts if width/height included margin/border/padding. As someone said he’s happy to use box-sizing for all his pages. I bet many people would be happy if a similar treatment were available for margin. Surely people use box-sizing to eliminate problems with border/padding, but the same problem is still there with margin.