Design comparison
SolutionDesign
Community feedback
- @jboysPosted 2 months ago
Hey Rahmonbek,
I've gone through your code and viewed the product preview card. Your layout for desktop looks really good. Here's a few things that could improve your solution:
Responsiveness:
- The card doesn't adapt to smaller screens and causes horizontal scrolling. The fixed width on the container (
w-[640px]
) is the main issue. - For the image and content layout, you can switch to
flex-col
on mobile screens and keepflex-row
on larger screens usingsm:flex-row
.
Semantics and accessibility:
- The heading structure could be improved for better hierarchy. Using
<h1>
,<h3>
, and<h5>
feels inconsistent. - The
alt
text for the images should be more descriptive. Instead of"image-product-desktop"
, try something like"Gabrielle Essence Eau De Parfum bottle from Chanel"
. - Adding more focus styles and features like
aria-label
would improve accessibilty.
Overall, your layout is good and codebase is clean. The main area to focus on is responsiveness, so the card looks good on all screen sizes.
Cheers!
1 - The card doesn't adapt to smaller screens and causes horizontal scrolling. The fixed width on the container (
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