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

Flexbox, media queries,

@wasswaenockmale

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 have learnt about media queries in CSS

Community feedback

Lucas 👾 104,440

@correlucas

Posted

Hello Wasswa, congratulations for you solution!

I look your code and everything seems great. I think you can fix only one aspect, your card isn't centered correctly. You can fix it applying the flexbox and height 100vh, and changing the container to flex/flex-direction:row to the body like the code below:

body { background-color: hsl(30, 38%, 92%); display: flex; justify-content: center; height: 100vh; align-items: center; }

.container { display: flex; flex-direction: row; }

Apply that and your card will be centered!

I hope it helps you!

Marked as helpful

1

@wasswaenockmale

Posted

@correlucas Thanks for your correction, could you also help and recommend for me a course for CSS and HTML

1
Lucas 👾 104,440

@correlucas

Posted

@wasswaenockmale I'm happy that my suggestion worked for you. Look, I'm new to CSS and HTML too, all I learned was doing the Frontend Mentor challenges and following Kevin Powell.

You can check his youtube channel and website(many of them are free):

Youtube: https://www.youtube.com/kepowob/videos

Courses: https://www.kevinpowell.co/courses/

I hope it helps you, keep it up, I want to see your next challenges.

If you want to leave any suggestion or feedback on my solution you`re welcome.

Keep it up

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