Product Description component using html and CSS flexbox
Design comparison
Solution retrospective
Is media queries still a best option for achieving responsiveness.
Community feedback
- @joaojgabrielPosted over 2 years ago
You'd probably be better off using Flexbox with flex direction: column for the content on the right to prevent unwanted overflow; that is how I did it. A media query closer to
700px
is also warranted, so it doesn't stretch the image further than its intrinsic width (of687px
if I remember correctly). Giving a greater width to the squished desktop version to give the inside elements some room to breathe is probably a good idea as well. Additionally, using the<picture>
element in the HTML to load only the necessary image is arguably better.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