Design comparison
SolutionDesign
Solution retrospective
How do we know when to use display:flex? And is it a best practice to use the em unit on paddings and margin?
Community feedback
- @mukwende2000Posted over 1 year ago
You use flex when you want to create a layout where two items are side by side like the layout in this challenge, another alternative is to use grid, its personal preference which one you choose in my opinion. em is fine for margin and padding yes. Although it may behave strangely if you don't understand how it works, so i suggest you really delve deep into learning about it otherwise using rem is good enough.
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