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

Mobile first - stats preview card

Tamar 80

@ttaammaarr

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


For his project I used a combination of flex and grid layouts. Once again I had trouble centering the card vertically for desktop view, but I finally managed using grid layout.

Somehow I can't make it work using display: flex;

Other than that it was a fun challenge! If you have any advice I'd love hear it :)

Community feedback

Account Deleted

To center it with flexbox you need to set a height (e. g. 100vh) and use "display: flex", "justify-content: center" and "align-items: center", all on the parent element.

Marked as helpful

0

Tamar 80

@ttaammaarr

Posted

@zauri-khutsishvili

Hi Zauri,

Thank you so much! I didn't set a height so that explains it, I appreciate your comment!

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