Responsive Product Preview Card using grid and relatives units
Design comparison
Solution retrospective
I'm proud of how I implemented CSS Grid properties to achieve the solution.
What challenges did you encounter, and how did you overcome them?I tried to avoid using media queries, so I used CSS Grid, but I encountered problems when the screen size was reduced. The content transformed into columns, which was fine, but there was no space between the content and the body.
What specific areas of your project would you like help with?I would like to get feedback on how I can create a responsive page using only CSS Grid without media queries
Community feedback
- @Ibtehaj-Ali-1Posted 4 months ago
Everything is looking great. Just increase the spacing between the Original and Discount prices and increase the
margin-top
andmargin-bottom
to theprice-product
.Marked as helpful0 - @35degreesPosted 4 months ago
hi, I love grid too! You have the grid properties down and I love that you used 'minmax' to adjust the widths. I'm not sure there's a way to change the number of columns from two to one without a media query or at least a container query. Media queries are pretty easy to implement and I think they are valuable to use, and they work well with grid. Love your work!
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