Design comparison
SolutionDesign
Community feedback
- @woldutsegazgiPosted 19 days ago
You can use Flexbox to center elements perfectly on all devices. Avoid using
padding
for centering.Here’s how you can do it:
body { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; }
Additionally, there’s no need to add
min-width
to thebody
; instead, addmax-width: 320px
to the containerdiv
. You can also use the Figma design file to improve your font sizes and rounded corners.Overall, great effort!
Resources:
You can practice Flexbox with this site: https://flexboxfroggy.com/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