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 grid and media queries

@akash4102

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


how to make this more better?

Community feedback

@fermop

Posted

Hi Akash, how are you?

I really liked the result of your project, but I have one tip that I think you will like:

I noticed that the discount price doesn't have the line-through just as the design has, to fix this we can do the following:

.price-2{
    position: absolute;
    color: gray;
    padding-top: 13px;
    𝘁𝗲𝘅𝘁-𝗱𝗲𝗰𝗼𝗿𝗮𝘁𝗶𝗼𝗻: 𝗹𝗶𝗻𝗲-𝘁𝗵𝗿𝗼𝘂𝗴𝗵;
}

The rest is great!!

Hope it helps 😄

Marked as helpful

1

@akash4102

Posted

@fermop thanks 😊😊

1
Nikola D 1,450

@NikolaD93

Posted

Hello there! 👋

Congrats for completing the challenge! 🙌

I have a suggestion for you:

1.You can do some reset CSS styles. By resetting your styles, you avoid defaulting to the browser’s built-in styles, which differs from browser to browser. 👇

You can reset styles like this, just write the following code in the CSS file:

  • { margin: 0; padding: 0; box-sizing: border-box; }

Hope this was helpful for you!

Happy holidays! 🎉✌

Marked as helpful

1

@akash4102

Posted

@Nikola1232456 thanks for suggestions

1

@VCarames

Posted

Hey there! 👋 Here are some suggestions to help improve your code:

  • The image’s alt tag description needs to be improved upon ⚠️. Assume that you are describing the image to a someone over the phone.

More Info:📚

https://www.w3.org/WAI/tutorials/images/

  • This component requires the use of two images 🎑 at different breakpoints ⚠️. The picture element will facilitate this.

Here is an example of how it works: EXAMPLE

Syntax:

  <picture>
    <source media="(min-width: )" srcset="">
    <img src="" alt="">
  </picture>

More Info:📚

https://www.w3schools.com/html/html_images_picture.asp

  • Do not uppercase ❌ "perfume" in HTML as it is not accessible friendly. Instead you will want to style it in CSS.
  • The only heading ⚠️ in this component, is the name of the perfume; “Gabrielle Essence Eau De Parfum” . The rest of the text should be wrapped in a paragraph element.

If you have any questions or need further clarification, feel free to reach out to me.

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