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

Product preview card component solution

@orafaeloliveira

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


I'm not sure about the size of the gaps between the elements.

Community feedback

@tesla-ambassador

Posted

Hey Refael, congratulations on completing this challenge! Was it fun? I hope it was 😃 Here's a few pointers you might find useful:

  • On the mobile view, your card's layout breaks making it lose it's centeredness. I looked through your code and realized that you used grid for your layout. Therefore, you might consider adding the following properties to your body
body {
  height: 100vh;
  background-color: var(--cream);
  display: grid;
  align-items: center;
  justify-content: center;
}

It should center your card on both desktop and mobile view.

  • In order to resolve some of your accessibility issues, you might wanna use landmarks in your html code, these help browsers easily navigate your code. So you might consider wrapping your divs in landmarks like <main> or <header> or <footer> you need to do this according to how your page is structured. Incase you want to know more about landmarks, follow this link.

Happy coding and keep up the good work!👍

1

@orafaeloliveira

Posted

@tesla-ambassador Thank you for your advices! Yes, I need to use landmarks more times in my challenges, I'll remember that. And I forgot to change my mobile style, thanks for remember me. 😄

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