
Design comparison
Solution retrospective
media previews
What specific areas of your project would you like help with?any feedback is helpful
Please log in to post a comment
Log in with GitHubCommunity feedback
- @frontend-devv
Use the clamp() function to avoid media queries. Set min-height: 100vh for body to center the container along cross axis. Use rem instead of px for better scalability and consistency across devices.
Happy coding!
Marked as helpful - P@mpujazon
Hello @wawawoh! I can see that the card is not centered on the screen. You are using Flex, but it is not centering the card. To fix this, you need to specify the height of the container that holds the card—in this case, the
body
. The following code will display it correctly:body { display: flex; justify-content: center; align-items: center; height: 100vh; /* Ensures full height of the viewport */ width: 100vw; /* Ensures full width of the viewport */ margin: 0; /* Removes default margin */ }
Kind regards.
- @dangduomg
try to center the card vertically with
margin: auto;
and give it less padding otherwise its good
Join 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