Design comparison
Solution retrospective
Any tip for newbie?
Community feedback
- @correlucasPosted about 2 years ago
๐พHello DANIJEL, congratulations for your solution!
I've checked your code and you component isn't fully centered, this is due the
width: 1440px
you've set to the body, note that this value1440px
is just the resolution the design was created not the screen size itself so you can remove it.To align the component to the center you can use
body
andmin-height
andflex
to make the component align to the parentbody
. See the code below:body { background-color: hsl(204deg 48% 88%); /* width: 1440px; */ /* position: absolute; */ min-height: 100vh; display: flex; font-size: 15px; font-family: Outfit, sans-serif; align-items: center; justify-content: center; flex-direction: column; }
Hope it helps and happy coding!
Marked as helpful1@RedPitcherPosted about 2 years ago@correlucas Hi Lucas, thank you for your time and answer!
Where should I put width then or is it irrelevant?
Happy coding!
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