Content-box / border-box


#1

Is there one I should use over the other or is it a personal preference/ situational choice?


#2

It’s a technical choice, not a personal preference. When tightness of fit is not a concern then the border can be outside of the content box, but if the size is critical for the right fit, then the border should go inside the content box.


#3

Addendum

https://repl.it/@mtf/border-box-vs-content-box

border-box_vs_content-box

In the above, on the left the border is outside of the content box, on the right the border is inside content box.