Design comparison
Community feedback
- @Mr-FunderburkPosted about 1 year ago
One thing I will point out is how you placed the card. You used a
flexbox
for the#card-of-product
with thejustify-content
set tocenter
(which is great) but then you added a bunch ofpadding
(360px on all sides) and awidth
(1440px). This causes the screen to scroll (even on my fairly large display). You can remove the padding and the width and the flexbox will automatically horizontally center the card. You can also remove themargin: 0 auto
since this is accomplished by theflexbox
. For the vertical centering, if you add aheight
of100vh
(or 100% of the viewport height), it will center it vertically. Of course, this would cause other items to shift if you had them since this box now occupies the entire height of the viewport. Something to keep in mind!Otherwise, nice work!
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