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-preview-card

@nikhila2001

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@PriyanshuSharma0326

Posted

A recommendation regarding your code.

In order to set the main container in the center of the screen:

You need to give height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center; to the body element, and not assign any position value to the container class.

You can also reach more information about how to center the div from here.

I hope this helps! :)

Marked as helpful

1

@nikhila2001

Posted

@PriyanshuSharma0326 Thank you for your recommendation! I will keep in mind.

1

@PriyanshuSharma0326

Posted

@nikhila2001 Glad I could help!

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