Design comparison
Solution retrospective
Nothing much. The challenge was a walk-through for me.
What challenges did you encounter, and how did you overcome them?This wasn't much of a challenge.
What specific areas of your project would you like help with?An suggestions on how I can improve are highly welcome.
Community feedback
- @KapteynUniversePosted 18 days ago
Hey, nice job.
10rem padding on the body is too much, you can use flex or grid for centering the items and remove padding.
body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
I see you used flex other places, so no need to explanation i guess. Also remove
transform: translate(50%, 0%);
from the .card to make this work.I also see you gave
position: relative;
to the body and tried to center the card div but withoutposition: absolute;
to the .card it won't work. If you use the flex i wrote above, you don't need it, so you can delete alltop:0
left:0
andtransform
styles.You can use article tag for the card div. The article tag specifies independent, self-contained content. An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.
For multiple images that change on different screen sizes, you can use picture tag
Since add to cart will add this item to the cart on a full scale web page, maybe using a button would be better.
Rest looks good.
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