
Design comparison
Solution retrospective
difference between padding and margin in simpler terms.
Community feedback
- @aditya-alshiPosted 2 months ago
Hi @almarinezb
Great efforts on this project.
Here's one way to look at margin and padding. This diagram by MDN Web Doc can be helpful.
How I think about it is, I imagine someone need to pack their crockery. They would take a wooden box. Lay some foam, or shredded paper to cushions the crockery. They place crockery in between the cushion. Close the box. And wrap the box with bubble-wrap.
Here the crockery will be the content, the foam or shredded paper will be the padding, the box will be the border, and the bubble wrap will be the margin.
Also. I would suggest to apply display flex to your
.container{ }```
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord