Design comparison
SolutionDesign
Solution retrospective
When should px, rem, em, and % be used? Are there any good practices that I'm not adhering to?
Community feedback
- @ashiqfuryPosted over 3 years ago
- px unit are used for
padding
,margin
,line-height
etc.. - % and some other relative units are used for
width
,height
etc.
Using relative units for everything is good practice, and also your design looks responsive if you use % units.
Thanks..
Marked as helpful1 - px unit are used for
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