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 Design, working mobile firts

Rockoโ€ข 10

@rockop11

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison

SolutionDesign

Rockoโ€™s questions for the community

I didn't find a specific difficulty since I have knowledge of HTML and CSS, but I wanted to refresh my understanding of the concepts.

I think I would like feedback on the folder structure in a small project where there's only HTML, CSS, and images.

Yes, I'd like to know how to optimize CSS. I tried to keep it as simple as possible by using only classes, but I found myself needing to add classes to more elements in the HTML than I would have preferred.

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • Apply borders to the container, not individual images or components. Use overflow: hidden on the container to clip excess from the image for a similar effect.
  • Optimize image loading using the <picture> tag for different versions. Example:
    <picture>
        <source media="(min-width: 460px)" srcset="./images/image-product-desktop.jpg">
        <img src="./images/image-product-mobile.jpg" alt="{your alt text goes here}">
    </picture>
    
  • Prefer min-height: 100vh over height to avoid cutting off components on smaller screens.

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

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