Andrew Kim
Andrew Kim's Blog

Andrew Kim's Blog

How to remember margin/border/padding in css

Andrew Kim's photo
Andrew Kim
·May 5, 2022·

1 min read

Remembering which is which for margin/border/padding in the css box model is tricky when you start learning css. Here is my tip worth 2 cents.

From outside to inside, it is margin -> border -> padding.

Again, Margin, Border, Padding, in order. M.B.P., which by accident happens to be the same acronym for MacBook Pro. Screen Shot 2022-05-05 at 12.15.39 PM.png

Happy Coding!

 
Share this