While i do understand the overall CSS box model in theory like padding, border, margin, my understanding is restricted to this individual parts.
I often gets confused how this is actually rendered by the browser. E.g. Like padding is within the border, but how is margin calculated?
Is it wrt the box border or with respect to the screen?
If we give both left and right margins, what takes higher precedence?
If there is a width as well as left/right margins, how does the actual rendering take place like is the width of box made first,then the padding or what is it like?
What difference does a float attribute added to this box with margin make?
The box consists of 4 sizes: outer to inner:
border:orborder-width:width:ormax-width:An image for illustration:

A floated element takes margin into account, so if you have
it will float left, but will have a 100px margin from the left side.