Design comparison
Solution retrospective
Little bit challenging. Feedbacks are highly welcome
Community feedback
- @Mr-jawPosted almost 2 years ago
Hello there 👋
Congratulations on completing the challenge
here is a quick fix to center the component at the center of the screen
-
in the body element remove
margin-top: 10rem;
-
In the body element add the following lines of codes.
body { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; }
This will make the component position at the center of the screen 👍
I hope this was useful 😊
HAPPY CODING
1@GamesLegendPosted almost 2 years ago@Mr-jaw But then mobile users will not be able to scroll, that's why I added that (margin-top).
0@Mr-jawPosted almost 2 years ago@GamesLegend
Hello 👋
Then you can remove the
margin-top
in the desktop view. Since, when you have a fixed margin. On larges, t won't be centered. so using flex andmin-height
in thebody
, you can achieveHope this was helpful 👍
1 -
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