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 product card using Css.

tayblackk 30

@tayblackk

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


There were times when I had to refer back to MDN docs for clarification regarding grid and flexbox. I've been challenging myself to clean up my CSS so it is more legible for viewers.

Another challenge I faced within the project was the image. svg.. I could not figure it out and I began to get so tired that my problem-solving skills turned into frustration.

You will find this at the bottom of the css stylesheet.

/* Having trouble adding the .svg - Really not even sure what is going on - Probably too tired / / .btn[data-icon="shopping-cart"]::before { content: ""; background-image: url("images/icon-cart.svg"); background-color: #fff; width: 15px; height: 16px; } */

I should have been more patient and tried to solve the issue. Nonetheless, I will be back tomorrow for another challenge. This is the conclusion of my 4th week of self-taught html & css.

Community feedback

P

@Jolijn0101

Posted

Hi Tayblackk, Your product card looks great. I Think you can make it yourself a lot easier to add the given svg icon as an image element like so: <button class="btn"><img class="icon-cart" src="images/icon-cart.svg" alt="icon-cart" />to Cart</button> and then styling the element with css. Hopefully this will solve your problem with adding the icon cart and I wish you a lot of fun learning html and css with less frustration.

Marked as helpful

0

tayblackk 30

@tayblackk

Posted

@Jolijn0101 I appreciate your insight! I will provide you with an update later once I give this a try.

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