Forums

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

Home Forums CSS Margin Extends Beyond Parent Re: Margin Extends Beyond Parent

#130305
Anonymous
Inactive

I’ve had issues with this in the past and, while I understand why it works this way, I still think it’s kind of weird. I’m not sure I like that the browser “assumes” what I’m wanting instead of just letting me define exactly what I want. Something else that would be a good addition to the spec would be “box-sizing: margin-box;”. I think it would be very useful to say, “I want a box that’s 100px by 100px regardless of how much padding, border, and margin I put on it.” Anyway, just some thoughts on this 2.5 year old post!