Design comparison
Solution retrospective
Is this the best way to centre the element?
Community feedback
- @Jo-cloud85Posted over 1 year ago
One of the fastest ways to center your card will be:
body { background-color: hsl(212, 45%, 89%); height: 100vh; //add this display: grid; //add this place-content: center; //add this }
Also, you should try using margin-top to create the gap between your card and the attribution instead of using multiple <br>
Marked as helpful1@JimrealfPosted over 1 year ago@Jo-cloud85 I love this solution. I just learnt Grid but I totally forgot about it. The margin-top makes more sense actually. THank you
0 - @JoezzyongitPosted over 1 year ago
Hi, i will advice to retouch your work. Try and reduce the height and width and also add the border-radius property, this property allows you to add rounded corners to elements!
1@JimrealfPosted over 1 year agoThank you. I will work on that. Open to more feedbacks@Joezzyongit
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