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

Responsive layout using Flexbox

Gaurav 80

@GauravKumawat2002

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

@danielemanca1983

Posted

Hi Gaurav,

Nice solution to the coding challenge, however I'd like to provide you with a suggestion for future reference, to make the code even better.

For instance you have an .image-container class in your mark-up, which you target in the CSS and assign an image to through the background-image property, in this case, I think the best would be to have a picture tag in the mark-up and use the srcset attribute where you can have multiple instances of the image, which makes it also accessible to screen readers, as using background-image is not accessible at all by screen-readers.

Here is an example of how to use the picture tag in HTML: picture

Other than that it's a really good solution, :)

1

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