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

https://elianarestrepo99.github.io/product-preview-card.github.io/

@ElianaRestrepo99

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

proud of making a nice and tidy graphics card, next time I would organize the padding measurements better.

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

The challenge was to separate the image from the content, solving it with a div and giving measurements to the image.

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

I would like to know how by organizing the container into two parts they can be of equal size without the need to play with the positions and measurements.

Community feedback

P
beowulf1958ā€¢ 1,170

@beowulf1958

Posted

Great job completing the challenge. Your page is awesome so far; however, I did notice some problems in the html.

First, all img tags need an alt value. This helps accessibility, and serves as a backup if the image does not load for any reason. Something like alt="bottle of Chanel perfume". Second, there are no h1 tags, and you skip from h2 to h6. Check out the article at Headings for more information.

The next step is to make the page responsive so it can be seen on a smaller (375px) screen. If you use @danielmrz-dev advice on the <picture> tag, you make the page more semantic and can swap out the desktop image with the mobile image with a @media query

      /* mobile version */
      @media screen and (max-width: 480px) {
        .grid {
          grid-template-columns: 1fr;
        }
      }

I was able to reverse-engineer a responsive version of your page that way. You might have to adjust some font-sizes, etc, but a relatively simple fix.

Have a great day, and Keep on Coding!

1
Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

Hello there!

Congrats on completing the challenge! āœ…

Your project looks great!

I have a suggestion about your code that might interest you:

šŸ“Œ You can use the <picture> tag when you have different versions of the same image.

Using the <picture> tag will help load the correct image to the user's device, saving bandwidth and improving performance.

Example:

<picture>
    <source media="(min-width: 768px)" srcset="{desktop image path here}">
    <img src="{mobile image path here}" alt="{alternative text here}">
</picture>

I hope this helps!

Other than that, excellent work!

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