Hi friends,
Welcome back to Today Jan Learned (TJL) #6. In this newsletter I share a new lesson every day, so stay tuned for today’s lesson. Today I want to share with you how to remember the difference between margin and padding.
Margin or padding?
While stying CSS elements I always seem to forget the difference between margin and padding. At some point I got so sick of not being able to remember this I decided to put a stop to this once and for all.
I came across this hilarious StackOverflow answer:
Which I can’t get out of my mind now… so there you go! To remember the difference between padding and margin just remember that padding is what they put on the inside of your padded cell when working with CSS finally drives you mad!
Recap
That’s it! Today we learned the difference between margin and padding.
Just remember that they put the padding on the inside of your padded cell when you finally go crazy trying to work with CSS!
Thank you so much for reading. See you next time!