NFT preview card component - using flexbox and hover states
Design comparison
Solution retrospective
Thanks for reviewing my project! As you can see, I have been struggling with the container size.
Please feel free to make any suggestions for improvement.
Community feedback
- @denieldenPosted almost 3 years ago
Hi Osius, great job!
Try to remove all
margin
fromcontainer
class and use flexbox to the body for center the card. Read here -> flex guideFor improvide accessibility wrap the content page into
main
tag ;)Also set
heigth
of body to100vh
because Flexbox aligns to the size of the parent container.Hope this help and happy coding :)
0 - @VladimirBrscicPosted almost 3 years ago
Hi, you do not actually need media queries here really...besides you could just move background-color from container class to <body> element. Generally for challenge like this (just a single card) you can set container width to around 85% and then max-width to some fixed width (like 500px for example).That way you'll have nice responsive site. Happy coding!
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