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 challenge using html and css

Ian Rioba 450

@Rioba-Ian

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


The desktop/mobile images were a bit challenging to change for the card but I wrapped it around a media query and set display: none for the desktop image.

Community feedback

Radek 490

@Radexman

Posted

Hi there, good job on that project! If you don’t mind, I will provide you with some feedback. So I checked your code and it appears that you used <h3> tag before <h1> and <h1> is repeated twice. This is considered a mistake because when using headings we want to stick to the so - called hierarchy. You probably did it because the font size was correct but you can just change it in css in no time. We typically want to start from h1 and move our way to h6. Here is some good resource on that topic:

https://www.contentkingapp.com/academy/headings/

Aside from that the code looks good, you have good naming convention for classes, there is indentation and some good whitespace going on. Very readable and self-explanatory.

Overall great work on that project! I hope I was a little bit helpful for you. Keep going and happy coding!

0
Lucas 👾 104,420

@correlucas

Posted

👾Hello Ian Rioba, congratulations for your new solution!

As an alternative you can manage the images (desktop and mobile) with the tag <picture>to wrap both desktop and mobile images together in the same tag, and render each image depending of the device (phone / computer) by the settings for the width you'll insert in the html

If you're not familiar to the picture tag you can look the documentation to see how to setup it: https://www.w3schools.com/tags/tag_picture.asp

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/product-preview-card-vanilla-css-and-custom-hover-state-on-hero-85A1JsueD1

👋 I hope this helps you and happy coding!

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