Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 8 months ago

Adaptive images using the content property in CSS and CSS Flexbox.

Ana Mohammed•90
@AnaMdTech
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 am most proud of successfully implementing a responsive design that adapts to both mobile and desktop devices. The project also helped me strengthen my understanding of CSS Flexbox and hover states, which are crucial for creating interactive user interfaces. The clean and minimal design outcome aligns well with the challenge's requirements, and I'm happy with how the hover effects bring the project to life. If I were to redo this project, I would focus more on accessibility by ensuring better screen reader support and improving keyboard navigation for interactive elements. Additionally, I would explore using CSS Grid instead of Flexbox to compare the differences in layout capabilities. Finally, I would dedicate more time to optimizing the code structure and comments for better readability and maintainability.

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

Initially, I struggled with ensuring the product image adapted well to different screen sizes. I used the content property in CSS for dynamic image loading and tested various screen sizes with browser developer tools.

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

I’d like feedback on the following aspects of the project:

How can I further optimize my CSS code for better performance and maintainability? Are there any accessibility issues that I overlooked? Suggestions on how to improve hover states or add subtle animations to enhance the user experience.

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 Ana Mohammed'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

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