Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Product Preview Card

Carisa Elam•100
@carisaelam
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I did the "mobile-first" method, and it definitely felt easier than going the other way around. Glad to have picked up on this! I'm sure it doesn't apply to all projects, but maybe it's just a good rule of thumb to start with?

What challenges did you encounter, and how did you overcome them?

I first put the images in as tags. But then when I went to add media queries and needed to change the src, I realized I couldn't do that. I had to go back in and reformat my HTML so that the images were actually just background images to a div so that I could then manipulate the src via media query. Took some extra time in there.

What specific areas of your project would you like help with?

Is it best practice to use background-image versus inserting an ?

When does it make sense to use each method?

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Carisa Elam's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License