Design comparison
Solution retrospective
All opinion is acceptable , Tell me what do you think i did it wrong to improve myself. Good luck for every body
Community feedback
- @dtp27Posted over 2 years ago
Hi Yoseif!
Great solution! Another way to center your component, because you're actually really close with using Flexbox in the body, is to add
min-height: 100vh;
. This will make sure the body takes up the entire viewing area, which will result in Flexbox centering the component in the view.One thing I would caution about using fixed position is that it takes the element out of normal flow and can cause interesting and unintended side effects when dealing with more components on the page.
Happy coding!
Dan
Marked as helpful0 - @sinjin25Posted over 2 years ago
There's a style-guide.md included in the files you downloaded. Those can help you get the correct font and text colors for the project.
You're using a serif font which usually looks bad for ui components like this.
You can use this snippet on the card to center your work on the page so that the design comparison slider lines up better:
position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
That will put it in the center of the page
Marked as helpful0
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