Design comparison
Community feedback
- @romila2003Posted about 2 years ago
Hi @PivtoranisV,
Congratulations 🎉 for completing this challenge, it was a great attempt. The card looks great however there are some issues I want to address.
- It is best practice to wrap the main content within the
main
tag which would ensure that your content is wrapped within the correct landmarks e.g.<main class="container"></main>
- Also, you should wrap the footer within the
footer
tag e.g.<footer class="attribution"></footer>
- Instead of having a
position
property with a value ofabsolute
, you should use theflexbox
property to center the card. You should remove theposition
property and thetransform
property too.
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: var(--neutral-color-100); flex-direction: column; }
I added the flex-direction property since you have a footer and it would be aligned under the card, with the flex-direction property.
Also, you should give your card a
max-width
property instead of thewidth
property to make it responsive. Then you can give thebody
apadding
of0 20px
, to prevent the card from touching the side of the screen.Overall, great attempt and wish you the best for your future projects so keep coding 👍.
Marked as helpful0@PivtoranisVPosted about 2 years ago@romila2003 Hi, thank you for your feedback, will change that in my code
1 - It is best practice to wrap the main content within the
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