Design comparison
Solution retrospective
This was mostly a review of past "card component" projects.
- How would you suggest I handle the widths for this project (compared to what I did)? Considering they were card components, I assumed it was fine to use "static" widths. Your thoughts? As always, let me know if there's something else I missed. Thank you in advance for your feedback. Cheers!
Community feedback
- @ApplePieGiraffePosted over 2 years ago
Hello, Jason Greenwald! 👋
Nice work on this challenge! 🙌 Your solution looks great and is responsive! 👏
A couple of things I'd like to suggest are,
- Using more semantic HTML elements in your markup, which is important for accessibility and SEO-related reasons. For instance, the description of the product should be a
p
element and the "Add to cart" element should be abutton
. If you’d like to learn more about how to write semantic HTML and why it matters, check out this short, helpful course. 😉 - As for setting widths for components such as this, I would set the width of the card component to
100%
and then adding a max-width to it to prevent it from becoming too wide when there's extra space around it. This is often better than setting the width of the element to a fixed value or percentage because it'll ensure that the element only takes up as much space as it should be allowed but also shrinks accordingly when the space around it shrinks.
Hope this helps. 😊
Keep coding (and happy coding, too)! 😁
Marked as helpful3@jaycgreenwaldPosted over 2 years ago@ApplePieGiraffe Yes, thank you for the feedback. You are spot on about the semantic HTML issue. I will also check out the course you mentioned too. I'll try out the width suggestion. I haven't mastered that concept yet, so I'm looking forward to trying out your solution. Thank you for the helpful feedback!
1 - Using more semantic HTML elements in your markup, which is important for accessibility and SEO-related reasons. For instance, the description of the product should be a
- @jaycgreenwaldPosted over 2 years ago
Just an FYI - Not sure why the title is only takes up two lines in the screenshot. Looking at the live site, it spans three lines just like the design. I appreciate any insight into why this is the case. (It bugs me, but I'm trying to be laid back about it.)
0@andrewpatasikPosted over 2 years ago@jaycgreenwald have you tried to generate a new screenshot?
1@jaycgreenwaldPosted over 2 years ago@andrewpatasik Hi Andrew - I did try yesterday. I'll try again today and see if anything has changed. Thanks!
0@jaycgreenwaldPosted over 2 years ago@GintokiYT Did it ever get resolved? Thanks for letting me know I'm not the only one to experience this.
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