Design comparison
SolutionDesign
Solution retrospective
how to did you guys make the card center to the screen,i used positioning to do this with flexbox align item and justify-content center I could not achieve this
Community feedback
- Account deleted
All you have to do to center the element is to add the following:
body { height: 100vh; /* you need to specify the height */ display: flex; align-items: center; justify-content: center; }
After that you should also make the heading bigger and use some margins and padding to move the text. And add a box shadow. That's it :)
1 - @maudlinmandrakePosted over 2 years ago
Hi! When I was working on this solution, I had to give
html
,body
, and my my main flex container a height of 100% in my stylesheet to get my component to center vertically correctly. Try that out and see if it helps!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