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

@Udy-Johnson10

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 had difficult with aligning the prices to the center and the right side height wasn't aligning with the left. I'm not sure of the positioning code that why I didn't use it. Also not sure whether the site adapts to any display screen properly.

Community feedback

@rostyslav-nazarenko

Posted

Hello! Nicely done!

  • HTML
    • use main and footer for semantics. Change <div class="section"> to <main class="section">, and <div class="attribution"> to <footer class="attribution">.
    • look at the picture element for providing different images to the different viewport widths, plus it has a lot more uses, check it up.
    • don't use id for styling, use only classes.
    • look at providing additional information for people who use screen readers as they will not understand what two prices mean. I'm still learning about accessibility...

Your CSS has some issues, keep learning and you will notice them yourself. Feel free to look at other people's solutions for learning purposes.

Keep coding! Have a great day!

Marked as helpful

1

@Udy-Johnson10

Posted

@rostyslav-nazarenko thank you for the feedback

0

@fibonacci001

Posted

the easiest way will be to display the prices in inline-block, and use margin: auto 0; or you specifically set a margin to help center it, and use media query to control the spacing when it's displayed on mobile. I hope this was helpful @Udy-Johnson10

Marked as helpful

0

@Udy-Johnson10

Posted

@fibonacci001 thank you for your feedback

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