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 Card with HTML & CSS

@YacoubDweik

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


What are you most proud of, and what would you do differently next time?

It was my first coding since a long time ago, I would define absolute height & width for the parent container next time

What challenges did you encounter, and how did you overcome them?

I used Mobile-First CSS and I got lots of stuff but now everything is good

What specific areas of your project would you like help with?

mmm Just is it better to use absolute units for the parent container? cuz in my case I just put the content and apply padding inside only, but when I wanted to make the div that has the img for example 30% of the parent height I couldn't! simple cuz the parent did not have any specific height

Community feedback

@SvitlanaSuslenkova

Posted

body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } Try this to align(top-bottom) and justify(left-right) your project to the center. It applies to the parent component(body), don't forget about !!min-height!!. You can use grid instead of flex too.

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