Order Summary Card - Easier challenge made with plain CSS.
Design comparison
Solution retrospective
I'm trying to resolve all free challenges, from easier to harder. So I saw this new newbie challenge and I had to do it just to continue the path.
I'm not gonna say I did this super fast, but I think I've gained confidence. It took me around two and a half hours to complete this. I will appreciate it any feedback.
Community feedback
- @vanzasetiaPosted over 3 years ago
👋Hi Carlos Guzman!
💪That's a great goal! Good luck with your journey!
Anyway, I have some feedback on this solution:
- The card has full width and almost full height on mobile view (360px * 640px). You can add
padding
to yourbody
element to prevent the card having full width on small screen sizes. - For all decorative images, you should leave the
alt=""
and addaria-hidden="true"
orrole="presentation"
. In this case, all images are decorative only. - I don't think, you need a
picture
tag, since it's just one singleimg
.picture
is useful for multi resolution images, like image for desktop and mobile. Annual Plan
should not be a heading. If you think this is important, I recommend to usestrong
tag. Heading tags usually use for titling a section.- Also, it for the
order-name
, I recommend to useul
and to wrap each item, you can useli
. - I recommend to make all elements have
box-sizing: border-box
, by doing this, it will prevent the elements from adding width when you addpadding
.
* { box-sizing: border-box; } /* OR */ html { box-sizing: border-box; } * { box-sizing: inherit; }
- Use
rem
or sometimesem
unit for setting amax-width
too. It will make sure when the user trying to scale their browser, everything will get bigger or smaller.
That's it! Hopefully this is helpful!
Marked as helpful0@guztrilloPosted over 3 years ago@vanzasetia Hi Vanza Setia, cool name. I appreciate you took the time to review my code. I agree with all your feedback (yep, I forgot the box-sizing: border-box, lmao) and I will update my code to follow your recommendations.
Thanks, it was really helpful.
0 - The card has full width and almost full height on mobile view (360px * 640px). You can add
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