Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

simple product preview card using flexbox

Mohamed 30

@MohamedBenArbi

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@anmolthedeveloper

Posted

Hello, Congratulations on completing this challenge

I observed you're using css Media Query for the image section, there's another way to achieve the same.

Using the <picture> tag is commonly used for responsive images, where different image sources are provided for different screen sizes and devices, and for art direction, where different images are used for different contexts or layouts. Example:

<picture>
<source media="(max-width: 768px)" srcset="small-image.jpg">
<img src="fallback-image.jpg" alt="Example image">
</picture>

Here's a detailed reference: here

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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