Design comparison
Community feedback
- @denieldenPosted over 2 years ago
Hi Dallas, great work on this challenge! π
Here are a few tips for improve your code:
- remove all unnecessary code, the less you write the better as well as being clearer: for example the html comment
- remove all
margin
from.container
class - use flexbox to the body to center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container - instead of using
px
use relative units of measurement likerem
-> read here
Overall you did well π Hope this help!
Marked as helpful0@DallasViarsPosted over 2 years ago@denielden and @denisomarcuyottito Thank you for the help! When I did this I was mostly trying to get through it as I struggle through using VS Code + Github instead of through Codepen.io. Honestly I'd not considered adding flexbox to the body tag before and that worked really well.
When I checked the accessibility rating on this it says I have one regarding not having a landmark around the attribution div, but I have one there. Any ideas on how to fix that?
1@denieldenPosted over 2 years ago@DallasViars You can wrap it with
footer
tag. Happy coding :)0 - @OTF31Posted over 2 years ago
Hi, to center horizontally and vertically you could use
flex
withjustify-content: center
andalign-items: center
.And you could use Pixel Perfext to have a design closer to the solution.
Have a nice day.
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